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

completion and .files



Whenever I create a complection that uses the -g option of compctl, I
lose the ability to handle .files the way I want, which is simply to say
the same way that zsh handles them normally.

Here's an example - compctl rule for cd.  I start out with the
following:

Attempt #1:
compctl -g '*(-/x)' cd

Now "cd <TAB>" gives me the proper completions for all the directories.
However, "cd .foo<TAB>" gives me an empty completion list, because no
.files match the -g pattern that I give.

Attempt #2:
compctl -g '*(-/x)' -x 'S[.]' -g '.*(-/x)' -- cd 

This fixes the original problem, but "cd ~/.foo<TAB>" fails once again.

Attempt #3:

compctl -g '(.|)*(-/x)' -- cd

This at least gets all the .directories; however 'cd <TAB>' lists all
my .directories as well.

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.



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