Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Odd bug with !?str?% history expansion
- X-seq: zsh-workers 28300
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Odd bug with !?str?% history expansion
- Date: Sat, 25 Sep 2010 21:23:36 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=hxF8Myqef7u7ntvg0HeCixGHoPyLx5XpupVVU6HpvDI=; b=IAXTAS9r5HaaLGlSaVTug094Lf8jTj0iiOzZ9taoyrL8j759/vgP8atW1tc7g+A7zU 8AUII0TuQzOVfRUQerI6YHlJWv2uUfD+UVP6cxbDzHUaN7fjkmnzcwCtws9v/yfkNvUe /qrqqO9CF79v53oV838M8+eeBSy1Ln1gQiwQA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=aUDy7kyQw8TOHoUnesTDFwL5LoHnGesqIlCZlIRRhuUqcmQaDsRVLsfKr8aWY/ncrx rHIcjZtJNo3Fb+Z/aVol6DxXW2ysthdtTl8OrDWi3wyHF1GvdIWIJP3LmmDeeOpmvRqL Sct6d/89vvIjfaBasWlyCWm59xSjp22Y3TPCk=
- In-reply-to: <AANLkTimzv8XQQL-994f4btwkefgHp4E=XnU_SrMvzJc6@xxxxxxxxxxxxxx>
- 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
- References: <AANLkTimzv8XQQL-994f4btwkefgHp4E=XnU_SrMvzJc6@xxxxxxxxxxxxxx>
This seems to be fixed by 28295.
On 21 August 2010 02:56, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> I just enabled banghist to play around with it for a bit, and as is so
> common for me, I hit a bug within 3 minutes of enabling a new feature.
> When using the !?str?% syntax to retrieve a word from history matching
> str, if it has a backslash escaped space in it, and it was loaded from
> the history file, PS2 is for some reason shown instead of the command
> being run.
>
> To reproduce:
> % echo 'echo ninja\ bug' > zsh.test
> % zsh -f
> % fc -R zsh.test
> % echo !?ninja?%
>>
> #pressing enter produces this result:
> echo ninja\
>
> ninja
> %
> #and instead pressing ctrl-c gives this result:
> echo ninja\
> %
> #this happens no matter how many times you do it, at least while
> #pressing ctrl-c since enter would insert it in history.
> #
> #now up-arrow so you get the test command, or just type it:
> % echo ninja\ bug
> ninja bug
> % echo !?ninja?%
> echo ninja\ bug
> ninja bug
> %
>
> This time it works, but why? I didn't explore what happens with other
> forms of quoting yet.
> Reproduced the bug in quite current cvs and 4.3.6. I don't have any
> problems when not using the %.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author