Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion for darcs
- X-seq: zsh-workers 20411
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Completion for darcs
- Date: Mon, 27 Sep 2004 11:02:11 +0200
- In-reply-to: <20040925003815.GD26071@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20040925003815.GD26071@xxxxxxxxx>
On 24 Sep, Wayne Davison wrote:
> I've made some simple changes to the zsh-completion example that
> ships with darcs (the version control system) and checked it into
> the Completion/Unix/Command dir. It seems to work well in my
> testing so far. I've attached the file to this email as well.
This doesn't complete filenames at all. Is that always right for darcs?
As the recent point on zsh-users about completion after "svn import"
highlights, it is quite annoying when filename completion is broken.
It very clearly looks like someone has converted this from a bash
function. You can specify that a bash function should revert to filename
completion if no matches are added with a "-o default" or "-o
bashdefault" option to complete. That's outside the function and a bit
hidden so we need to be careful about functions converted from bash.
We also don't need to grep for $PREFIX: matching is done far better
internally. Even in bash, that's not the right way to do it (use compgen
-W and pass the prefix as a final argument). We also don't need the
_darcs() { ... } stuff and the compadds should go through _wanted (the
second perhaps through _arguments). Return statements are also wrong.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author