From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: Completion for darcs
Date: Mon, 27 Sep 2004 11:02:11 +0200 [thread overview]
Message-ID: <17141.1096275731@trentino.logica.co.uk> (raw)
In-Reply-To: <20040925003815.GD26071@blorf.net>
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
next prev parent reply other threads:[~2004-09-27 9:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-25 0:38 Wayne Davison
2004-09-27 9:02 ` Oliver Kiddle [this message]
2004-09-28 0:03 ` Wayne Davison
[not found] <20050401080620.GA16347@vandal.simcon-mt.de>
[not found] ` <20050401080914.GB16347@vandal.simcon-mt.de>
[not found] ` <424D152C.2030006@free.fr>
[not found] ` <20050401123620.GA2607@ppe.happygiraffe.net>
[not found] ` <424D4A38.6010607@free.fr>
[not found] ` <20050405072940.GA9105@a5.repetae.net>
2005-04-05 13:03 ` completion " Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17141.1096275731@trentino.logica.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).