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


>>>>> Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> writes:

> The final goal for what?

Not completing all the stupid completion widget functions starting
with "_" at a shell prompt where they are totally irrelevant.

It'd still not be perfect; ideally they'd be in some other namespace
or something and therefore never be completed, but various helper
functions of my own would still be completable if I explicitly type
the "_".

> For completion (without looking at it in detail), I think what Greg
> wants could be done with the _ignore completer.

> :

> So, when you're talking about a final goal, IMHO, CORRECT_IGNORE is
> quite a reasonable solution.

Neither of these mechanisms do what I described.  If you allow
substring completion, i.e.

| zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' '+ l:|=* r:|=*'

then even with the 'ignored-patterns' zstyle set to '_*', if you try
to complete something which has no non-ignored matches, it will then
fall back to not ignoring those patterns, and will complete to
something that starts with "_" even when there was no "_" before you
hit <tab>.  If you remove the _ignore completer, then you can never
complete a function starting with "_".

For CORRECT_IGNORE, just look back to Richard's original question in
this thread - with that setting you can *never* complete something
that matched the pattern, which is not what you want.

Even with the 'matcher-list' setting for substring completion, file
completion of files starting with '.' does work as I want.  Can
someone point me to where that is handled?


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