Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: more wishes with automounter
- X-seq: zsh-users 3423
- From: Alexandre Duret-Lutz <duret_g@xxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: more wishes with automounter
- Date: 13 Sep 2000 11:32:50 +0200
- In-reply-to: "Bart Schaefer"'s message of "Tue, 12 Sep 2000 06:58:47 +0000"
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- Organization: LRDE/EPITA  http://www.lrde.epita.fr/
- References: <200009111436.KAA02215@xxxxxxxxxxxxxxxxxxxx>	<mvb66o27s0g.fsf@xxxxxxxxxxxxxxxxxxxx>	<1000912065847.ZM5756@xxxxxxxxxxxxxxxxxxxxxxx>
>>> "Bart" == Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> writes:
[...]
 Bart> Try this:
 Bart>     ztyle -e ':completion:*' file-patterns \
 Bart>       '[[ $PREFIX == /nfs/[^/]# ]] && \
 Bart>         { setopt noglob ; reply=(*(@)) ; setopt glob }'
 Bart> (Twaddling noglob like that was the only way I could get
 Bart> zstyle -e to put a file pattern into $reply -- the
 Bart> eval-ing messed up any other quoting I could think of.)
 Bart> This just says that if you're completing within the /nfs/
 Bart> directory itself, don't consider anything other than
 Bart> symlinks.  As I'm not sure why/where those links are
 Bart> getting stat()d, this may not be of any help ... but then
 Bart> again, it may.
This worked (i.e. directories are not automounted as a side effect
of completion).  But I couldn't get it to complete symlinks and
directories (my /nfs/ directory contains both).  Using:
    zstyle -e ':completion:*' file-patterns \
      '[[ $PREFIX == /nfs/[^/]# ]] && \
        { setopt noglob ; reply=(*(@,/)) ; setopt glob }'
Leads to:
~ % ls /nfs/<TAB>
_path_files:327: bad pattern: /nfs/*(@
 Bart> } [*] another wish would be that Zsh complete those invisible
 Bart> }     directories; or more generaly: give the user the possiblity
 Bart> }     to add "virtual files" (anywhere he want), that Zsh would
 Bart> }     use for completion.
 Bart> The article that PWS referenced about this is zsh-users/3408.
Thanks, I had to get it from the archives
(Murphy's law: my zsh-users mbox bumps from 3406 to 3408...)
-- 
Alexandre Duret-Lutz
Messages sorted by:
Reverse Date,
Date,
Thread,
Author