mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-06 03:10:35 +01:00
Improve knife-solo support in knife command
This commit is contained in:
parent
df5b09e20b
commit
242328bd81
1 changed files with 15 additions and 6 deletions
|
|
@ -31,7 +31,7 @@ _knife() {
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
knifecmd)
|
knifecmd)
|
||||||
compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" diff exec environment index node recipe role search ssh status upload vault windows $cloudproviders
|
compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" diff exec environment index node recipe role search solo ssh status upload vault windows $cloudproviders
|
||||||
;;
|
;;
|
||||||
knifesubcmd)
|
knifesubcmd)
|
||||||
case $words[2] in
|
case $words[2] in
|
||||||
|
|
@ -62,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
|
||||||
;;
|
;;
|
||||||
|
solo)
|
||||||
|
compadd "$@" bootstrap clean cook init prepare
|
||||||
|
;;
|
||||||
upload)
|
upload)
|
||||||
_arguments '*:file or directory:_files -g "*"'
|
_arguments '*:file or directory:_files -g "*"'
|
||||||
;;
|
;;
|
||||||
|
|
@ -98,6 +101,12 @@ _knife() {
|
||||||
bag)
|
bag)
|
||||||
compadd -Q "$@" show edit list "from file" create delete
|
compadd -Q "$@" show edit list "from file" create delete
|
||||||
;;
|
;;
|
||||||
|
(bootstrap|clean|cook|prepare)
|
||||||
|
for json in $(ls -1 nodes/*.json); do compadd "$@" $(basename $json .json); done
|
||||||
|
;;
|
||||||
|
init)
|
||||||
|
for dir in $(find . -type d -maxdepth 1); do compadd "$@" $(basename $dir); done
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
_arguments '3:Subsubcommands:($(_knife_options2))'
|
_arguments '3:Subsubcommands:($(_knife_options2))'
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue