summaryrefslogtreecommitdiff
path: root/plugins/knife/_knife
diff options
context:
space:
mode:
authorMarc Paradise <marc@opscode.com>2013-04-08 17:07:06 -0400
committerMarc Paradise <marc@opscode.com>2013-04-08 17:07:06 -0400
commit2bae7ef4f9972d4b3accf6bd614e38d9a2410a70 (patch)
treec99906aae5347b0b0584753546f967f6859e7998 /plugins/knife/_knife
parent4300b63462c063fbb195de5557064dcaa2490387 (diff)
downloadzsh-2bae7ef4f9972d4b3accf6bd614e38d9a2410a70.tar.gz
zsh-2bae7ef4f9972d4b3accf6bd614e38d9a2410a70.tar.bz2
zsh-2bae7ef4f9972d4b3accf6bd614e38d9a2410a70.zip
initial support for chef 11 integrated knife-essentials
* added new commands 'diff' and 'upload' * Add basic file completion for file-centric commands 'diff' and 'upload'
Diffstat (limited to 'plugins/knife/_knife')
-rw-r--r--plugins/knife/_knife12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/knife/_knife b/plugins/knife/_knife
index 9f5b406af..b44283f78 100644
--- a/plugins/knife/_knife
+++ b/plugins/knife/_knife
@@ -31,7 +31,7 @@ _knife() {
case $state in
knifecmd)
- compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" exec environment index node recipe role search ssh status windows $cloudproviders
+ compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" diff exec environment index node recipe role search ssh status upload windows $cloudproviders
;;
knifesubcmd)
case $words[2] in
@@ -47,9 +47,12 @@ _knife() {
cookbook)
compadd -Q "$@" test list create download delete "metadata from" show "bulk delete" metadata upload
;;
- environment)
+ diff)
+ _arguments '*:file or directory:_files -g "*"'
+ ;;
+ environment)
compadd -Q "$@" list create delete edit show "from file"
- ;;
+ ;;
node)
compadd -Q "$@" "from file" create show edit delete list run_list "bulk delete"
;;
@@ -59,6 +62,9 @@ _knife() {
role)
compadd -Q "$@" "bulk delete" create delete edit "from file" list show
;;
+ upload)
+ _arguments '*:file or directory:_files -g "*"'
+ ;;
windows)
compadd "$@" bootstrap
;;