diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2004-09-25 00:26:08 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2004-09-25 00:26:08 +0000 |
commit | 4d431e1068a02e9e31c61cdf36d02f13f13ec760 (patch) | |
tree | 5b4efb8f0427d04f7a4b870bb37c263df81c90bf /Completion/Unix | |
parent | fc960bad4ed6f98b30412dba48d53bf711bc7ce9 (diff) | |
download | zsh-4d431e1068a02e9e31c61cdf36d02f13f13ec760.tar.gz zsh-4d431e1068a02e9e31c61cdf36d02f13f13ec760.tar.xz zsh-4d431e1068a02e9e31c61cdf36d02f13f13ec760.zip |
Completion for the darcs revision control system. Derived from
the zsh completion example that ships with darcs.
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_darcs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_darcs b/Completion/Unix/Command/_darcs new file mode 100644 index 000000000..d5856fe32 --- /dev/null +++ b/Completion/Unix/Command/_darcs @@ -0,0 +1,14 @@ +#compdef darcs + +_darcs() { + # 1 based array + if (($CURRENT == 2)); then + compadd -- $( darcs --commands | grep "^$PREFIX" ) + return 0 + fi + + compadd -- $( darcs ${words[2]} --list-option | grep "^$PREFIX" ) + return 0 +} + +_darcs "$@" |