Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Inconsistent parse error output
- X-seq: zsh-workers 51378
- From: Marlon Richert <marlon.richert@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Inconsistent parse error output
- Date: Wed, 8 Feb 2023 09:57:55 +0200
- Archived-at: <https://zsh.org/workers/51378>
- List-id: <zsh-workers.zsh.org>
% done; foo
zsh: parse error near `done'
% :; done; foo
zsh: parse error near `done'
% if; done; foo
zsh: parse error near `done'
% if; then done; foo
zsh: parse error near `foo'
%
I would've expected that last one to produce the same error output as
the previous ones.
This can lead to confusing output when the parse error occurs in a file:
% > tst << EOF
if :; then
:
done
# lots
# of
# comments
foo
EOF
% source tst
tst:9: parse error near `foo'
%
Messages sorted by:
Reverse Date,
Date,
Thread,
Author