]> git.eshelyaron.com Git - emacs.git/commitdiff
Make << shell heredoc expansion less enthusiastic
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 11 Oct 2019 19:36:32 +0000 (21:36 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 11 Oct 2019 19:36:38 +0000 (21:36 +0200)
* 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.

lisp/progmodes/sh-script.el

index cbc0ac74f09f7276ecd3a6d6c600c2878404faa1..2046080c42fb1d2896c6b30f0e12a3052acc5dfe 100644 (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)