GNU bug report logs -
#45390
Shell-script mode doesn’t like redirection at beginning of command
Previous Next
Full log
View this message in rfc822 format
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:
> 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.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I'm unable to reproduce most of this -- do/done seem to be matched, and
echo is font-locked. (I tried this in Emacs 25.1 -> Emacs 29.) The one
thing I can reproduce is the missing font-locking of the "for" keyword.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
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.