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

Re: "Alt ." to repeat last part of a command



On Fri, 23 Apr 2010 16:10:23 +0000
Carlo Trimarchi <mr.spoon21@xxxxxxxxx> wrote:
> On 23 April 2010 15:34, James Andrewartha <trs80@xxxxxxxxxxxxxxxxxx> wrote:
> > When you run 'zsh -f', does 'Alt .' work?
> 
> No, it doesn't.
> 
> >If not, what about after running 'bindkey -e'?
> 
> Yes, it works like I want. I mean, it repeats the last part of a command.
> 
> > Do you have EDITOR set?
> 
> I think it is set to vim:
> 
> lloyd% echo $EDITOR
> vim

so this bit of my previous message is what you need...


Unless you're in vi mode, in which case you can just bind it in the obvious
way.

bindkey -M viins '\e.' insert-last-word

This would mean there's a delay when you hit Esc to go to command mode,
because the shell needs to decide whether there's a "." next or not.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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