GNU bug report logs - #45390
Shell-script mode doesn’t like redirection at beginning of command

Previous Next

Package: emacs;

Reported by: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>

Date: Wed, 23 Dec 2020 10:34:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Shell-script mode doesn’t like redirection at
 beginning of command
Date: Wed, 23 Dec 2020 11:33:18 +0100
The “for” and “echo” in the following example are not font-locked in
shell-script mode, despite being syntactically valid.  (From my
experience, the “>&2 echo ...” idiom is quite common in practice, too.)

    >/dev/null for i in {1..5} ; do
        echo $i
    done
    >&2 echo 'Error!'

Additionally, the “for” and its “done” are not matched so the SMIE
grammar also needs fixing.

Best regards,
Dario

-- 
$ keyserver=hkps://hkps.pool.sks-keyservers.net
$ keyid=744A4F0B4F1C9371
$ gpg --keyserver $keyserver --search-keys $keyid




This bug report was last modified 3 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.