unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45390: Shell-script mode doesn’t like redirection at beginning of command
@ 2020-12-23 10:33 Dario Gjorgjevski
  2022-06-07 12:02 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Dario Gjorgjevski @ 2020-12-23 10:33 UTC (permalink / raw)
  To: 45390

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#45390: Shell-script mode doesn’t like redirection at beginning of command
  2020-12-23 10:33 bug#45390: Shell-script mode doesn’t like redirection at beginning of command Dario Gjorgjevski
@ 2022-06-07 12:02 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-07 12:02 UTC (permalink / raw)
  To: Dario Gjorgjevski; +Cc: 45390

Dario Gjorgjevski <dario.gjorgjevski@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-07 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 10:33 bug#45390: Shell-script mode doesn’t like redirection at beginning of command Dario Gjorgjevski
2022-06-07 12:02 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).