From: Clint Adams <schizo@debian.org>
To: Chris Lamb <chris@chris-lamb.co.uk>, 459455@bugs.debian.org
Cc: zsh-workers@sunsite.dk
Subject: Re: Bug#459455: Completion for vim-addons
Date: Sun, 6 Jan 2008 15:14:54 -0500 [thread overview]
Message-ID: <20080106201454.GA13272@scowler.net> (raw)
In-Reply-To: <20080106171544.5fca488d@localhost.localdomain>
On Sun, Jan 06, 2008 at 05:15:44PM +0000, Chris Lamb wrote:
> Attached is a Zsh completion script for Stefano Zacchiroli's "vim-addons"
> script that is shipped with Debian's "vim-addon-manager" package.
Committing to CVS.
Index: Completion/Debian/Command/_vim-addons
===================================================================
RCS file: Completion/Debian/Command/_vim-addons
diff -N Completion/Debian/Command/_vim-addons
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Completion/Debian/Command/_vim-addons 6 Jan 2008 20:11:07 -0000
@@ -0,0 +1,50 @@
+#compdef vim-addons
+
+local state line cmds ret=1
+typeset -A opt_args
+
+_arguments -C \
+ {-q,--query}'[be quiet and make the output more parseable]' \
+ {-r,--registry-dir}'[set the registry directory]' \
+ {-s,--source-dir}'[set addon source directory]' \
+ {-t,--target-dir}'[set addon target directory]' \
+ {-v,--verbose}'[increase verbosity]' \
+ {-y,--system-dir}'[set system-wide target directory]' \
+ {-h,--help}'[help]' \
+ {-w,--system-wide}'[set target directory to the system-wide one (overrides -t)]' \
+ '1: :->cmds' \
+ '*: :->args' && ret=0
+
+case $state in
+ cmds)
+ cmds=(
+ 'install:install the specified addon'
+ 'remove:remove the specified addon'
+ 'list:list available addons in registry'
+ 'status:list the status of addons'
+ 'disable:disable the specified addons'
+ 'amend:under the effects of the previous disable'
+ 'files:list the files composing the specified addon'
+ 'show:display detailed information about the specified addon'
+ )
+ _describe -t commands 'vim-addons command' cmds && ret=0
+ ;;
+ args)
+ case $line[1] in
+ install)
+ _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 == "removed" { print $1 }') && ret=0
+ ;;
+ amend)
+ _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 == "disabled" { print $1 }') && ret=0
+ ;;
+ remove)
+ _wanted addon expl 'addon' compadd $(command vim-addons -q | awk '$2 ~ /disabled|installed/ { print $1 }') && ret=0
+ ;;
+ files|status|disable|show)
+ _wanted addon expl 'addon' compadd $(command vim-addons list) && ret=0
+ ;;
+ esac
+ ;;
+esac
+
+return ret
parent reply other threads:[~2008-01-06 20:15 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20080106171544.5fca488d@localhost.localdomain>]
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=20080106201454.GA13272@scowler.net \
--to=schizo@debian.org \
--cc=459455@bugs.debian.org \
--cc=chris@chris-lamb.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).