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

Re: cd ..<tab>?



Bart Schaefer wrote:
On Jan 30, 12:10am, Dennis Haney wrote:
Subject: Re: cd ..<tab>?

Sven Wischnowsky wrote:
 zstyle ':completion:*' special-dirs ..

to make `..' be considered a possible match (and hence it will get the
slash appended).

Is there a way to make this work properly with setopt GLOB_DOTS?

Just make the style more specific:

zstyle ':completion:*:(cd|chdir|pushd|popd):*' special-dirs ..
How is that going to help me?

You might also check the documentation for the ignore-parents style.
ignore-parent works the wrong way...

It want to ignore '..' when it is a stupid choice.
eg.
mkdir Z
cd Z/[tab]
should NOT complete to 'cd Z/../'
(unless CHASE_DOTS is on and 'cd Z/..' will be different from 'cd .')

likewise...
mkdir Z
mkdir Z/Y
cd Z/[tab]
should NOT give me '..' as a choice, but just complete to 'cd Z/Y'
(unless CHASE_DOTS is on and 'cd Z/..' will be different from 'cd .')

-- 
Dennis
use Inline C => qq{void p(char*g){printf("Just Another %s Hacker\n",g);}};p("Perl");



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