GNU bug report logs -
#52496
syntax highlighting problem on emacs shell-script mode
Previous Next
Reported by: Yilkal Argaw <yilkalargawworkneh <at> gmail.com>
Date: Wed, 15 Dec 2021 00:36:02 UTC
Severity: normal
Tags: moreinfo, patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #30 received at 52496 <at> debbugs.gnu.org (full text, mbox):
Andreas Schwab <schwab <at> linux-m68k.org> writes:
> On Dez 19 2021, Lars Ingebrigtsen wrote:
>
>> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>>
>>> On Dez 19 2021, Lars Ingebrigtsen wrote:
>>>
>>>> Right. I haven't real the shell documentation -- is "@" a valid heredoc
>>>> ... separator?
>>>
>>> Any word is.
>>
>> But is @ word constituent?
>
> A shell word can be almost anything.
Relevant part of (bash) Redirections:
> The format of here-documents is:
> [N]<<[-]WORD
> HERE-DOCUMENT
> DELIMITER
>
> No parameter and variable expansion, command substitution, arithmetic
> expansion, or filename expansion is performed on WORD. If any part of
> WORD is quoted, the DELIMITER is the result of quote removal on WORD,
And (bash) Definitions:
> 'word'
> A sequence of characters treated as a unit by the shell. Words may
> not include unquoted 'metacharacters'.
Preceded by:
> 'metacharacter'
> A character that, when unquoted, separates words. A metacharacter
> is a 'space', 'tab', 'newline', or one of the following characters:
> '|', '&', ';', '(', ')', '<', or '>'.
(AFAICT the same goes for POSIX sh[1])
So IIUC for here-documents anything is fair game except (1)
{single,double,back} quotes (2) metacharacters (3) backslashes and
comment openers (#); all of which can still be used if quoted or escaped
*on the opening line only*.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04
This bug report was last modified 3 years and 245 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.