Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_expand completer with ignored-patterns and all-expansions
- X-seq: zsh-users 13293
- From: Max Mikhanosha <max@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: _expand completer with ignored-patterns and all-expansions
- Date: Sun, 28 Sep 2008 14:11:38 -0400
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I'm in an directory with java sources, and I want to cvs update
**/build.xml.
cvs update **/build.xml<tab>
I have it so that my completers are _expand then _complete, and first
choice it offers is a list of all the files, which is what I want, so
my choices are:
1. bin/a/b/c/build.xml bin/d/e/f/build.xml a/b/c/build.xml d/e/f/build.xml
2. bin/a/b/c/build.xml
3. bin/d/e/f/build.xml
4. a/b/c/build.xml
5. d/e/f/build.xml
6. foo/bar/build.xml
Pressing Enter on choice 1. leads to a quick realization that bin/
directory is not under version control, so whole cvs command fails
with unable to find CVS/Entries.
After doing:
zstyle ':completion:*expand*:*' ignored-patterns 'bin/*'
The choices offered are:
1. a/b/c/build.xml
2. d/e/f/build.xml
3. foo/bar/build.xml
As you can see the choice of all the completions together disappeared?
It seems that the ignored-patterns is applied by _expand to the
all-expansions completion thus disabling it. What I'm looking for is:
1. a/b/c/build.xml d/e/f/build.xml foo/bar/build.xml
2. a/b/c/build.xml
3. d/e/f/build.xml
4. foo/bar/build.xml
I.e. when removing ignored-patterns from all-expansions, expand should remove
individual elements before all-expansions is joined into the string, while
currently it looks like its doing it after.
The $fignore behaves as expected, i.e. patters in fignore are causing
the matches to be excluded from the all-expansions individually, I
can't use $fignore because it appears only the file portion is being
matched there, so adding bin/* to fignore does not work.
(P.S I know that I could have typed **/(^bin)/build.xml instead of
playing with completions system, but its still looks like a bug/problem)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author