Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Add CORRECT_NOCOMPSYS option
- X-seq: zsh-workers 27012
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: Add CORRECT_NOCOMPSYS option
- Date: Thu, 28 May 2009 21:03:38 +0200
- In-reply-to: <m3vdnlawz2.fsf@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <090404193718.ZM19801@xxxxxxxxxxxxxxxxxxxxxx> <20090405191304.1908fca8@pws-pc> <090405151115.ZM13159@xxxxxxxxxxxxxxxxxxxxxx> <20090406100929.505617e2@news01> <2d460de70905270930j681da6a5kf7848d67d89f0c69@xxxxxxxxxxxxxx> <20090527175941.3bbe2eba@news01> <m37i02cqd9.fsf@xxxxxxxxxxxxxx> <2d460de70905280148iebfcegcb4143c33e510efd@xxxxxxxxxxxxxx> <20090528092514.GA3315@xxxxxxxxxxxxxxx> <m3vdnlawz2.fsf@xxxxxxxxxxxxxx>
Greg Klanderman <gak@xxxxxxxxxxxxxx>:
> >>>>> 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.
[...]
Yes, that was my guess. Completion.
> > 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 "_".
Since I don't use matcher-lists, I cannot comment any further. Compsys
experts will have to take on that one. :)
> 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.
That's my point. CORRECT_IGNORE has *nothing* to do with completion.
It's about correction. That is precisely why I was asking about what
Richard meant by 'final goal', because the thread initially had
nothing to do with completion.
Final goal in completion - based on what you described - will have to
be solved within compsys.
Final goal in correction (for the problem I described), can be
achieved by what CORRECT_IGNORE provides. If someone wants more
control in _correction_ than that, that someone would probably have to
reimplement the correction code into a more flexible system (maybe
even function based - like compsys). But I doubt it would be worth it.
> 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?
Could a compsys guru shed some light on this? :)
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author