Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "Alt ." to repeat last part of a command
- X-seq: zsh-users 15027
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: "Alt ." to repeat last part of a command
- Date: Fri, 23 Apr 2010 20:48:11 +0100
- In-reply-to: <p2y8f67b6f81004230910r42565790va3769a9bb28cb786@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <g2r8f67b6f81004230214j86a58e34r974261cb88ea1250@xxxxxxxxxxxxxx> <20100423092734.GA7499@xxxxxxxxxxxxxxxxxxx> <o2k8f67b6f81004230249i9377d8ev8f499ee9dfd7ffd@xxxxxxxxxxxxxx> <i2y1b26d5c61004230834s6b0ffe4dla8664b56276f0226@xxxxxxxxxxxxxx> <p2y8f67b6f81004230910r42565790va3769a9bb28cb786@xxxxxxxxxxxxxx>
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