Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Complete with _arguments -- for zsh
- X-seq: zsh-workers 29334
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: Complete with _arguments -- for zsh
- Date: Sun, 22 May 2011 15:16:13 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:x-mailer; bh=WdL8XeihvscOd6VPZC2+aGfDSmIIN0NEAoiMYP90R3Y=; b=FgA+5bLt93dqp+Ys2utU54YN0Iuas4kgksLr9jD8ZV+yQt2W+tzv8k3W+wqhsfwrwi O0BdZSc6Yq0YXgd33zUm38RcQYkv+45sgY6l10l4X6EC3nXkggxG8B8I8byIP2zzA+Wt b9olBtRyLO9A7YR+7tsDWcVsA/lCevnABOTIs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer; b=Ndj6RwR7cqYobhpy1SPNZbfwCtc8KmvExRBz//Hp1J+wzGlXWDqTTTsuNbcJUhUk1g I669ZlNdUt5Dbi+WpRXPq/mgx0xgjZho7W6k6FuQl8B2DkyLr4sOerH4jAocSRDujubB o9zk1qB8XcIA/cdOnz/rUPamusWNDYCLZ0EqE=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I sort of threw options at _arguments until it worked like I wanted,
Frank tested it too and it seems to work fine. The only thing it doesn't
do is complete the -o option itself more than one time, but it didn't
complete it at all before so I consider it an improvement still.
---
Completion/Unix/Command/_sh | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh
index 9e72a29..74aee53 100644
--- a/Completion/Unix/Command/_sh
+++ b/Completion/Unix/Command/_sh
@@ -5,7 +5,11 @@ if [[ $service == zsh ]]; then
if [[ ${words[CURRENT-1]} == -o ]]; then
_options
# no other possibilities
- return
+ return 0
+ fi
+ if _arguments -S -s -- \
+ '*:' ; then
+ return 0
fi
fi
--
1.7.4-rc1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author