Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: two useful binds



On Tue, 2006-04-04 at 08:45 +1000, Michael Wardle wrote:
> My favorites:
> 
> Alt-p
> 	cp foo/bar/file.dat /really/long/path
> 	(many commands including other copies)
> 	cp<Alt-p> or cp f<Alt-p>
> 
> this works better with Alt-p bound to history-beginning-search-backward
> instead of history-search-backward.


But how do you know how much line prefix to type in order to get a
correct match, and how do you efficiently deal with multiple history
lines with the same long prefix? I find
history-incremental-search-backward to work better since it has neither
of those issues--

cp foo/bar/file.dat /really/long/path
...
<ctrl-r>foo

and I can stop typing as soon as the correct line appears. (Or, keep
pressing ctrl-r to step through previous matches.)






Messages sorted by: Reverse Date, Date, Thread, Author