Make << shell heredoc expansion less enthusiastic

* lisp/progmodes/sh-script.el (sh--maybe-here-document): Require a
space before expanding a heredoc (bug#3226).  This allows the user
to insert a bash <<< "herestring", which was previously difficult.
This commit is contained in:
Lars Ingebrigtsen 2019-10-11 21:36:32 +02:00
parent 255c892b48
commit 8e4a090ff7

View file

@ -4356,7 +4356,7 @@ The document is bounded by `sh-here-document-word'."
(or arg (sh--maybe-here-document)))
(defun sh--maybe-here-document ()
(or (not (looking-back "[^<]<<" (line-beginning-position)))
(or (not (looking-back "[^<]<< " (line-beginning-position)))
(save-excursion
(backward-char 2)
(or (sh-quoted-p)