From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 810 invoked from network); 13 Sep 2000 09:25:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Sep 2000 09:25:50 -0000 Received: (qmail 1147 invoked by alias); 13 Sep 2000 09:25:01 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3423 Received: (qmail 1125 invoked from network); 13 Sep 2000 09:25:00 -0000 To: zsh-users@sunsite.auc.dk Subject: Re: more wishes with automounter References: <200009111436.KAA02215@soup.ads.apexinc.com> <1000912065847.ZM5756@candle.brasslantern.com> From: Alexandre Duret-Lutz X-Home-Page: http://www.epita.fr/~duret_g/ X-Attribution: adl Organization: LRDE/EPITA http://www.lrde.epita.fr/ Date: 13 Sep 2000 11:32:50 +0200 In-Reply-To: "Bart Schaefer"'s message of "Tue, 12 Sep 2000 06:58:47 +0000" Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>> "Bart" == Bart Schaefer 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/ _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