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

Re: Very useful !#^



On 03/08/07, Tim <piglet@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> antho.charles@xxxxxxxxx writes:
>
> > On Fri, Aug 03, 2007 at 02:33:36PM +0100, Stephane Chazelas wrote:
> >
> >> See <Ctrl-Alt>_ and <Alt>2<Ctrl-Alt>_
> >>
> >> in emacs mode. That's the copy-prev-word widget.
> >
> > Yes, but copy-prev-word is different of !#^, try
> >
> > cp verylongname.tex backup_!#^<tab>
> > expands
> > cp verylongname.tex backup_verylongname.tex
> >
> > but
> > cp verylongname.tex backup_<C-M_>
> > expands
> > cp verylongname.tex backup_backup_
> >
> > Am I wrong?
>
> That seems to be where <Alt>2<Ctrl-Alt>_ comes in.

copy-earlier-word is also nice, it picks earlier words each time you
press it, so the first press gives
cp verylongname.tex backup_backup_
and the second gives
cp verylongname.tex backup_verylongname.tex
It also works in conjunction with insert-last-word to pick earlier
words in earlier words more interactively than typing numbers.
Some of these may need autoloading and binding, I don't remember which
are on by default :).

-- 
Mikael Magnusson



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