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

Re: Completion for cd



> Isn't this a job for the ignore-parents zstyle?  I don't recall if I've
> seen bug #240624, so maybe I'm unaware of some detail.

The specific complaint is that if you cd to a named directory, then try
to complete an argument to cd when CDABLE_VARS is set, the named
directory which is the same as $PWD will be offered for completion
(in addition to usernames which are invalid arguments at this point;
this facet is bug #240618).

> zstyle :completion::complete:cd:: ignore-parents pwd

This works if I do something like

% cd ../<TAB>

$PWD will be excluded.

But if I do

% cd
% zstyle :completion::complete:cd:: ignore-parents pwd
% cdpath=(..)
% cd c<TAB>

or

% cd
% zstyle :completion::complete:cd:: ignore-parents pwd
% setopt cdablevars
% cd c<TAB>

"clint" will be completed in either case.  I believe that the latter
behavior illustrates Thorsten's complaint.



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