Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: conditionally match part of file name to most recently modified file
- X-seq: zsh-users 11584
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: conditionally match part of file name to most recently modified file
- Date: Mon, 18 Jun 2007 15:41:33 +0200
- In-reply-to: <20070618110948.3d8d739f@xxxxxxxxxxxxxx>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070617211644.GA11636@xxxxxxxxxxxx> <20070618110948.3d8d739f@xxxxxxxxxxxxxx>
On 2007-06-18 11:09:48 +0100, Peter Stephenson wrote:
> You can complete the most recent matching file using a generic completer:
>
> zstyle ':completion:most-recent-file:*' match-original both
> zstyle ':completion:most-recent-file::::' completer _menu _files _match
> zstyle ':completion:most-recent-file:*' file-sort modification
> zstyle ':completion:most-recent-file:*' file-patterns '*:all\ files'
^^^^^^^^^^
Is that all\ files or all-files (used in the manual)?
> zstyle ':completion:most-recent-file:*' hidden all
> zle -C most-recent-file menu-complete _generic
> bindkey '^X.' most-recent-file
I like that. But the 4th line should probably be:
zstyle ':completion:most-recent-file:*' file-patterns '*(^/):all\ files'
to avoid completing on directories (which can often get recent).
For symbolic links, how can one take into account the target instead
of the link itself?
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author