Subject: Shell-script mode doesn’t like redirection at beginning of command

From: Dario Gjorgjevski <[email-masked]>
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