Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 3.1.9 completion problems: automounter
- X-seq: zsh-users 3420
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "E. Jay Berkenbilt" <ejb@xxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Subject: Re: 3.1.9 completion problems: automounter
- Date: Tue, 12 Sep 2000 06:14:35 +0000
- In-reply-to: <1000912052009.ZM5715@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200009111436.KAA02215@xxxxxxxxxxxxxxxxxxxx> <1000912052009.ZM5715@xxxxxxxxxxxxxxxxxxxxxxx>
On Sep 12, 5:20am, Bart Schaefer wrote:
}
} Hmm. I've just been playing with zsh on a machine at work that has an
} automounted directory, and I can't reproduce the behavior you described.
[...]
} with the trailing slash, the mount happens and I get completions. This
} happens both with and without the new completion system loaded.
I'm sorry, I was mistaken about having loaded new completion. With the
new completion system *properly* loaded, I *can* get this to happen.
So here's the answer to your question:
zstyle -e ':completion:*' file-patterns '[[ -d $PREFIX:h/. ]]'
This tests whether the prefix (or "/", if there's no prefix, but that's
harmless) contains a "." directory, then ignores the result; so the only
effect is to force the directory to be automounted. Since it does not
set a value for $reply (see the "zstyle -e" doc), completion proceeds as
if the style were not set at all.
Note that if you actually *want* to set file-patterns for some other
context, you'll have to add the test to those styles as well, or the
side-effect will go away in those contexts.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author