zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] Alias with unclosed quote leaves incorrect string in history
@ 2015-03-07 22:11 ZyX
  2015-03-07 22:48 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: ZyX @ 2015-03-07 22:11 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-07 22:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-07 22:11 [BUG] Alias with unclosed quote leaves incorrect string in history ZyX
2015-03-07 22:48 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).