Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion for cd



On Mar 31, 10:22pm, Thorsten Haude wrote:
> 
> * Bart Schaefer wrote (2004-03-28 21:56):
> >
> >    zsh% cd ~
> >
> >Now type ctrl+x and then h.
> 
> Ok, what are these? What to search for in the manual to read up on
> these things?

They're the contexts and tags used for setting completion styles.

"man zshcompsys" or the equivalent info doc pages.
 
> >You should see something like:
> >
> >    tags in context :completion::complete:-tilde-::
> 
> Well, something seems to be *very* wrong because I see this:
> 
> tags in context :completion::expand:::

Aha!  You're using the _expand completer.  That's where those home
directories are coming from.

Various styles you can experiment with (you probably don't want to start
with all of them at once):

zstyle ':completion:*:expand:*' keep-prefix true
zstyle ':completion:*:expand:*' accept-exact continue
zstyle ':completion:*:expand:*' subst-globs-only true

I find the accept-exact one to be the most useful.



Messages sorted by: Reverse Date, Date, Thread, Author