Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] Alias with unclosed quote leaves incorrect string in history
- X-seq: zsh-workers 34682
- From: ZyX <kp-pav@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxx>
- Subject: [BUG] Alias with unclosed quote leaves incorrect string in history
- Date: Sun, 08 Mar 2015 01:11:17 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1425766278; bh=pKcOZBo7oyG/VFIXZ0MzzTd30y8BgLhbbEx5GpnkGqk=; h=From:To:Subject:Date; b=IQ9YRxCSePWDmu1L7xbT0AQJzcXbRqgCzNObGpisiGSrgc28FS4N7/R69ZIOJWhOX EirTBcvVPKXtwVpR+ic/mTW3pKS86hPX0IENyQngWpgqsOMZhf6UaDwKuNCZQ8sDul /NcLBrM5WrXWxHLtp5Khv4iWcbyo7woKA5e89k5U=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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