Variable: sh-here-document-word

sh-here-document-word is a customizable variable defined in sh-script.el.gz.

Value

"EOF"

Documentation

Word to delimit here documents.

If the first character of this string is "-", this is taken as part of the redirection operator, rather than part of the word (that is, "<<-" instead of "<<"). This is a feature used by some shells (for example Bash) to indicate that leading tabs inside the here document should be ignored. In this case, Emacs indents the initial body and end of the here document with tabs, to the same level as the start (note that apart from this there is no support for indentation of here documents). This will only work correctly if sh-basic-offset is a multiple of tab-width.

Any quote characters or leading whitespace in the word are removed when closing the here document.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sh-script.el.gz
(defcustom sh-here-document-word "EOF"
  "Word to delimit here documents.
If the first character of this string is \"-\", this is taken as
part of the redirection operator, rather than part of the
word (that is, \"<<-\" instead of \"<<\").  This is a feature
used by some shells (for example Bash) to indicate that leading
tabs inside the here document should be ignored.  In this case,
Emacs indents the initial body and end of the here document with
tabs, to the same level as the start (note that apart from this
there is no support for indentation of here documents).  This
will only work correctly if `sh-basic-offset' is a multiple of
`tab-width'.

Any quote characters or leading whitespace in the word are
removed when closing the here document."
  :type 'string
  :group 'sh-script)