From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: two useful binds From: Drew Perttula To: zsh-users@sunsite.dk Content-Type: text/plain Date: Tue, 04 Apr 2006 22:38:33 -0700 Message-Id: <1144215513.6999.7.camel@dot.bigasterisk.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Seq: zsh-users 10134 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 or cp f > > 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 ... foo and I can stop typing as soon as the correct line appears. (Or, keep pressing ctrl-r to step through previous matches.)