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

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



>   > 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.

This workaround does exactly what I want.  I just bound your
zle-fetch-previous and zle-fetch-next to ^x^p and ^x^n respectively so
I get the benefits of the lexical history except when I really want
the other in which case I can specify it directly.  Thanks.

                                Jay



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