Zsh Mailing List Archive
Messages sorted by:
Re: conditionally match part of file name to most recently modified file
- X-seq: zsh-users 11585
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: conditionally match part of file name to most recently modified file
- Date: Mon, 18 Jun 2007 14:55:45 +0100
- In-reply-to: <20070618134133.GN25961@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070617211644.GA11636@xxxxxxxxxxxx> <20070618110948.3d8d739f@xxxxxxxxxxxxxx> <20070618134133.GN25961@xxxxxxxxxxxxxxxxxxx>
Vincent Lefevre wrote:
> > zstyle ':completion:most-recent-file:*' file-patterns '*:all\ files'
> Is that all\ files or all-files (used in the manual)?
It's a tag, so it should be all-files.
> > 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).
That's possible. You can restrict it on the command line, too; I
sometimes type "*(.)" and complete that.
> For symbolic links, how can one take into account the target instead
> of the link itself?
"*(-^/)" or "*(-/)" should do the trick. I've had funny results with
non-existent targets when doing this on the command line.
I've wondered for quite a long time why that's not the default since the
times when you want to identify symbolic links themselves are limited. I
wonder if it's time for another option? What would it do, make it so
that both (/) and (-/) followed symbolic links but (--/) didn't?
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview
Messages sorted by: