Commit 2bae7ef4 authored by Marc Paradise's avatar Marc Paradise
Browse files

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'
parent 4300b634
...@@ -31,7 +31,7 @@ _knife() { ...@@ -31,7 +31,7 @@ _knife() {
case $state in case $state in
knifecmd) 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) knifesubcmd)
case $words[2] in case $words[2] in
...@@ -47,9 +47,12 @@ _knife() { ...@@ -47,9 +47,12 @@ _knife() {
cookbook) cookbook)
compadd -Q "$@" test list create download delete "metadata from" show "bulk delete" metadata upload 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" compadd -Q "$@" list create delete edit show "from file"
;; ;;
node) node)
compadd -Q "$@" "from file" create show edit delete list run_list "bulk delete" compadd -Q "$@" "from file" create show edit delete list run_list "bulk delete"
;; ;;
...@@ -59,6 +62,9 @@ _knife() { ...@@ -59,6 +62,9 @@ _knife() {
role) role)
compadd -Q "$@" "bulk delete" create delete edit "from file" list show compadd -Q "$@" "bulk delete" create delete edit "from file" list show
;; ;;
upload)
_arguments '*:file or directory:_files -g "*"'
;;
windows) windows)
compadd "$@" bootstrap compadd "$@" bootstrap
;; ;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment