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

Re: parse errors and up-line-or-history



On Oct 17,  3:35pm, E. Jay Berkenbilt wrote:
> 
> zsh% for in *; do echo $i; done
> zsh: parse error near `do'
> 
> which seems entirely reasonable.  If you then do ^p to fix it, you see
> only
> 
> zsh% for in *; do
> 
> and not the whole command.

Congratulations, you've revived the "literal vs. lexical history" debate,
if it ever really was a debate.

Zsh used to have an option to store the command history as the literal
input text, rather than as lexical words.  IIRC, it actually stored both
and let you select which one to retrieve.  The duplication was resolved
in favor of lexical history a *very* long time ago, with the side-effect
that anything that won't lex, doesn't make it into the history.

For a partial workaround, see zsh-workers/10996.



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