zsh-users
 help / color / mirror / code / Atom feed
From: Alexandre Duret-Lutz <duret_g@lrde.epita.fr>
To: zsh-users@sunsite.auc.dk
Subject: Re: more wishes with automounter
Date: 13 Sep 2000 11:32:50 +0200	[thread overview]
Message-ID: <mvbu2bkd4cd.fsf@phobos.lrde.epita.fr> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Tue, 12 Sep 2000 06:58:47 +0000"

>>> "Bart" == Bart Schaefer <schaefer@candle.brasslantern.com> 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


  reply	other threads:[~2000-09-13  9:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-11 14:36 3.1.9 completion problems: automounter E. Jay Berkenbilt
2000-09-11 17:33 ` more wishes with automounter Alexandre Duret-Lutz
2000-09-12  6:58   ` Bart Schaefer
2000-09-13  9:32     ` Alexandre Duret-Lutz [this message]
2000-09-13 15:02       ` Bart Schaefer
2000-09-12  5:20 ` 3.1.9 completion problems: automounter Bart Schaefer
2000-09-12  6:14   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvbu2bkd4cd.fsf@phobos.lrde.epita.fr \
    --to=duret_g@lrde.epita.fr \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).