From 8e4a090ff71f64b1d36aebc3f6a8e0145f690bf9 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 11 Oct 2019 21:36:32 +0200 Subject: [PATCH] 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. --- lisp/progmodes/sh-script.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index cbc0ac74f09..2046080c42f 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -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) -- 2.39.5