Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: most-recent-file completion and accept-line
- X-seq: zsh-users 8014
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: most-recent-file completion and accept-line
- Date: Thu, 23 Sep 2004 00:59:01 -0700 (PDT)
- In-reply-to: <20040922224506.GA18241@xxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040922224506.GA18241@xxxxxxxxxxxx>
- Reply-to: zsh-users@xxxxxxxxxx
On Thu, 23 Sep 2004, Eric Smith wrote:
> How do I bind a key combination to complete the most recent file
> and then automatically run accept-line or <enter> on this
> filename?
This seems like an odd question, because any key _combination_ you choose
will be at least as many keystrokes as typing ctrl-o enter. Normally you
want bindings for things that would otherwise take lots of keystrokes.
However:
accept-most-recent() {
zle most-recent-file && zle .accept-line
}
zle -N accept-most-recent
bindkey '^X^O' accept-most-recent
Messages sorted by:
Reverse Date,
Date,
Thread,
Author