zsh-users
 help / color / mirror / code / Atom feed
* Reverse history searching in zsh
@ 2005-04-18 17:58 Tejasvi Aswathanarayana
  2005-04-18 18:31 ` Andrey Borzenkov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tejasvi Aswathanarayana @ 2005-04-18 17:58 UTC (permalink / raw)
  To: zsh-users

I have been hearing about ZSH for quite sometime now. I have been
hesitant to move coz I am not sure if ZSH has this one "cool" feature
of  bash, the reverse-search, which searches the history in reverse
order and gets you the matches.... This is one heck of a feature that
I wouldnt want to miss in my shell.
(Ctrl-R to activate the reverse search)

< /home/k00ld00d >
(reverse-i-search)`cp': sudo cp arch/i386/boot/bzImage /boot/bzImage.kusp


Does anybody know if zsh has this feature... looked on the web but
couldnt find this feature in zsh!

Thanks
Tejasvi


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

* Re: Reverse history searching in zsh
  2005-04-18 17:58 Reverse history searching in zsh Tejasvi Aswathanarayana
@ 2005-04-18 18:31 ` Andrey Borzenkov
  2005-04-18 18:55 ` Nikolai Weibull
  2005-04-19  2:08 ` Wayne Davison
  2 siblings, 0 replies; 5+ messages in thread
From: Andrey Borzenkov @ 2005-04-18 18:31 UTC (permalink / raw)
  To: zsh-users, Tejasvi Aswathanarayana

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

On Monday 18 April 2005 21:58, Tejasvi Aswathanarayana wrote:
> I have been hearing about ZSH for quite sometime now. I have been
> hesitant to move coz I am not sure if ZSH has this one "cool" feature
> of  bash, the reverse-search, which searches the history in reverse
> order and gets you the matches.... This is one heck of a feature that
> I wouldnt want to miss in my shell.
> (Ctrl-R to activate the reverse search)
>
> < /home/k00ld00d >
> (reverse-i-search)`cp': sudo cp arch/i386/boot/bzImage /boot/bzImage.kusp
>
>
> Does anybody know if zsh has this feature... 

yes it does. It is called history-incremental-search-backward in zsh and is 
bound to ^R by default in emacs key bindings:

{pts/1}% bindkey -L | grep back
...
bindkey "^R" history-incremental-search-backward

(it is possible that bash and zsh inplementations are slightly different, I do 
not use bash on regular basis).

-andrey

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: Reverse history searching in zsh
  2005-04-18 17:58 Reverse history searching in zsh Tejasvi Aswathanarayana
  2005-04-18 18:31 ` Andrey Borzenkov
@ 2005-04-18 18:55 ` Nikolai Weibull
  2005-04-19  2:08 ` Wayne Davison
  2 siblings, 0 replies; 5+ messages in thread
From: Nikolai Weibull @ 2005-04-18 18:55 UTC (permalink / raw)
  To: zsh-users

Tejasvi Aswathanarayana, April 18:

> I have been hearing about ZSH for quite sometime now. I have been
> hesitant to move coz I am not sure if ZSH has this one "cool" feature
> of  bash, the reverse-search, which searches the history in reverse
> order and gets you the matches.... This is one heck of a feature that
> I wouldnt want to miss in my shell.
> 
> Does anybody know if zsh has this feature... looked on the web but
> couldnt find this feature in zsh!

Yes, it does.  It has loads of other features that are even more useful.
Install the shell and read the documentation and try out the things that
strike you as interesting.  In the end, you may find that you will be
able to leave Bash behind and make the transition to Zsh,
        nikolai

-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


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

* Re: Reverse history searching in zsh
  2005-04-18 17:58 Reverse history searching in zsh Tejasvi Aswathanarayana
  2005-04-18 18:31 ` Andrey Borzenkov
  2005-04-18 18:55 ` Nikolai Weibull
@ 2005-04-19  2:08 ` Wayne Davison
  2005-04-20  7:15   ` Felix Rosencrantz
  2 siblings, 1 reply; 5+ messages in thread
From: Wayne Davison @ 2005-04-19  2:08 UTC (permalink / raw)
  To: Tejasvi Aswathanarayana; +Cc: zsh-users

On Mon, Apr 18, 2005 at 12:58:16PM -0500, Tejasvi Aswathanarayana wrote:
> This is one heck of a feature that I wouldnt want to miss in my shell.
> (Ctrl-R to activate the reverse search)

The implementation in zsh is even better than that in bash.  For
instance, bash doesn't let you backspace over a mistyped character like
zsh does (in zsh backspace works like it does in emacs -- it backs up to
any previous matches that were visited via extra Ctrl-R presses, and
then removes search characters).  Older versions of bash had several
other deficiencies, but I just tried a fairly modern bash (for the first
time in a while), and they seem to have fixed some the problems I had
encountered in older versions.

Zsh also has several other search features, such as typing the name of
a command and pressing Escape-p (or Meta-p) will walk through the prior
history lines that contain that command.

..wayne..


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

* Re: Reverse history searching in zsh
  2005-04-19  2:08 ` Wayne Davison
@ 2005-04-20  7:15   ` Felix Rosencrantz
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Rosencrantz @ 2005-04-20  7:15 UTC (permalink / raw)
  To: zsh-users

After a request from Wayne to "brain-storm some ideas on how to
improve the recall of desirable prior commands.", I started putting
down some ideas I had for incremental search functionality on the
zshwiki (http://zshwiki.org/ImprovedIncrementalSearch).

I tend to use incremental search quite a bit to recall history, and
find it quite useful, though it could be better. Bart provided some
great comments, which I tried to incorporate into my suggestions. 
These ideas might help influence what work is done on the incremental
search widget.  It is on the wiki, so additional ideas/feedback can be
added.

-FR.


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

end of thread, other threads:[~2005-04-20  7:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-18 17:58 Reverse history searching in zsh Tejasvi Aswathanarayana
2005-04-18 18:31 ` Andrey Borzenkov
2005-04-18 18:55 ` Nikolai Weibull
2005-04-19  2:08 ` Wayne Davison
2005-04-20  7:15   ` Felix Rosencrantz

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).