Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Better way to execute commands from history?
- X-seq: zsh-users 14339
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: gak@xxxxxxxxxxxxxx
- Subject: Re: Better way to execute commands from history?
- Date: Thu, 3 Sep 2009 16:49:24 +0200
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=RKb1du/MZyNJtmO4OTID21bHkpdAhSQ5n+KcOQUjuHg=; b=sZN0qWyzEAWH72TQI3CRonbMa7C/ZNI77pZEicWeFpzRznQx7/B+HJOKqz9z2PiV0u oTWwPVdweJZCTzQVZCRFSYv0os7qt4ZB09XWJPvUj1nYrkdyFFpkTy3tunQyOKNvffMY c18RZK+WdOnKtI0PcoJktfHm4WgbOp7wk2msg=
- 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 :cc:content-type; b=LAEEeWagctPt9t6VXs3Lai3H2nDl9hxcspj1JY/QX/KTYxwxQMS5TiWD7FB8QAzJIn 4VMQdgQ0ZrUq5XHQYQ9jbBpuSLbOo/FVf1tUAkRi0vq06Gnhv7Om2XwDGArFWiQOFX2+ V9cvIvanXOsChZ4xXLDdHu+sepSslleR4qBD0=
- In-reply-to: <m3skf4qeii.fsf@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <6a42eec70909021254p62849de5r2c53d7f29fec3f07@xxxxxxxxxxxxxx> <237967ef0909021324m6e4b06cbw5bd9c3ae82f35568@xxxxxxxxxxxxxx> <m3skf4qeii.fsf@xxxxxxxxxxxxxx>
2009/9/3 Greg Klanderman <gak@xxxxxxxxxxxxxx>:
>
>>>>>> On September 2, 2009 Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
>> If you rebind ^R (and ^[^R) to history-incremental-pattern-search-forward
>> (the default is without the "pattern-"), you can press ^R and type cd*link
>> to get the same result, but you can iterate backwards as usual too.
>
> Nice.. anyone know how hard it would be to make a regex variant?
These widgets are implemented in the C code, not as shell code, so it would
take at least some work. Maybe not that much, it looks like (and I'm
half talking
out of my ass here) the doisearch() function already takes a 'pattern'
argument that
could be extended to be an enum instead of on/off, and have it use
regcomp/regexec
instead of the builtin patcompile() function family. (I'm not
volunteering to do this).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author