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

Re: completion



On 01/07/2015 09:26 PM, Bart Schaefer wrote:
On Wed, Jan 7, 2015 at 4:43 PM, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
But the ambiguity shouldn't be intentional.
Nevertheless, it is.
...

If * matches everything, then this could mean [any of]

  :completion:[any function]:complete:[any cmd]:[any arg]:[any tag]
  :completion:[any function]:[any completer]:complete:[any arg]:[any tag]
  :completion:[any function]:[any completer]:[any cmd]:complete:[any tag]

You're correct, it could.  But "matcher-list" also has to match, and
THAT only happens in one of those three cases, so there's no need to
constrain the pattern any further (unless you WANT to; refer to my
car-cover analogy).
Ah! So I find myself reaching for a better word. 'ambiguity' = uncertainty or confusion. What we have here, then, is not confusion, but rather a carefully
expanded space of possibilities, or freedoms.

$ ls zsh* ... the asterisk is not ambiguous, we know *exactly* what is means.
It expands the matching space, but that is not an ambiguity because we know
exactly what the rules are. If our zstyle asterisks do something analogous, then they are not an ambiguity. Right? Wrong?




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