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

Re: completion and .files



Nikita Borisov wrote:
>Attempt #2:
>compctl -g '*(-/x)' -x 'S[.]' -g '.*(-/x)' -- cd 
>
>This fixes the original problem, but "cd ~/.foo<TAB>" fails once again.

How about

compctl -g '*(-/x)' + -g '*(D-/x)' cd

i.e., try normal globbing first, and if that fails, try again allowing
dot files.

>What I'm basically looking for is to get at all the files that zsh would
>have listed had I not used a compctl rule, and filter out any that are
>not directories.

I'd like to implement the ability to do this directly.  I'd like some
way for completion functions to reinvoke the compctl mechanism to
provide it with an array of completions using a normal compctl recipe,
so it could implement more extravagant conditional completions and do
tweaks that a plain compctl can't.  Is this a good idea?

-zefram



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