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

[BUG] Alias with unclosed quote leaves incorrect string in history



Given the following input:

===================================
% alias -g S='"'
% echo S abc def S
dquote> "
 abc def S

%
===================================

if I press Up now it will show

===================================
% echo S" abc def S
"
===================================

which is the original string + a quote after first `S` which is wrong.

Second S also does not end the string, but I do not think this is a bug.

Tested on zsh -f with zsh-5.0.7-r2 (-r2 is an ebuild version, modified with patch from https://bugs.gentoo.org/show_bug.cgi?id=538684) and commit 0e319ecadc86a589c9f28819efae9e0bf972ee1b.

Same thing will happen if I e.g. have unclosed `$(` or `'` in an alias. I think it is more correct to deal with this problem by errorring out when user tries to use such an alias.



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