Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Questions (and PATCH: small change to _complete)
- X-seq: zsh-workers 8784
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Questions (and PATCH: small change to _complete)
- Date: Thu, 25 Nov 1999 19:39:53 +0000
- In-reply-to: <199911250954.KAA03611@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199911250954.KAA03611@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Nov 25, 10:54am, Sven Wischnowsky wrote:
} Subject: Re: Questions (and PATCH: small change to _complete)
}
} I wrote:
}
} > When completing in command position, _normal appends `-complete-' to
} > the context name (e.g. `:complete:-command-'). This is fine. When
} > completing arguments of commands, however, it only appends the command
} > name (e.g. `:complete:dvips'). I'm a bit worried that someday we will
} > find out that we have used a tag name that is also the name of a
} > command and then it's non-trivial to write a compstyle-pattern that
} > correctly matches only the command name.
}
} Ouch ;-) There was already the cvs tag.
}
} For now this patch makes command names be preceded and followed by two
} colons. I.e. to unambiguously match the command name you can now do
} `*::cvs:*' and to test for a command/tag combination: `*::command:*:tag'.
This only solves the problem in one direction, doesn't it? That is, now
you can tell that tag is not a command name, but how do you tell that a
command name is not a tag?
What I mean is, if testing "*:cvs:*" to find the cvs tag, but the context
is "...::cvs::..." because the command name is "cvs", then the tag branch
is going to be taken because "*:cvs:*" matches both "::cvs::" and ":cvs:".
It's a pain to have to test "*[^:]:cvs:*" just to be sure, especially
since that won't match if "cvs" is the first thing in the context (or is
that impossible for a tag name?).
} And I forgot to say that before the next release we should make sure
} that we set up good defaults for styles and probably improve the
} default _sort_tags. But I think this should really be done at the end.
I still need some good examples of styles. As I mentioned before, I'd
never done much with compconf, so I didn't have anything for the "new"
compconf to convert into styles. Consequently, I'm now back almost to
the bottom of the learning curve in understanding exactly what I can or
might want to do, and how.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author