Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Strange parsing bug(?)



Hi all,

I have stumbled upon a really weird bug. Due to it being late & me
being ill, I thought I did something wrong, but I pruned a rather
long & complex part of my zshrc down do this:

  echo "!"

The evil part is that a warning was part of a really deep & broad
boolean expression which made me assume I did something wrong
when the interactive parser failed to do what I wanted.

Frustrating when you find the actual cause after several hours :p

I suspect it's history access/modification gone awry because of
the exclamation mark and the fact that only interactive use is
affected, but I am not sure. Stuff in <brackets> are key presses,
the # is an 'inline' comment:

richih@roadwarrior ~ % zsh -f
roadwarrior% echo 'echo "!"' > temp
roadwarrior% source temp
!
roadwarrior% echo "!"
dquote> <Enter>
dquote> <CTRL-C>
roadwarrior% <UP>
roadwarrior% echo "
<CTRL-C> # there is a blank line, here. Cursor is at the left
roadwarrior% echo "!""

roadwarrior%


Of course, I might have stumbled onto a hidden feature, but if that
is the case, I would argue that this is extremely against the
expectation of most users.


Richard



Messages sorted by: Reverse Date, Date, Thread, Author