diff options
| author | Mark Cornick <mark@cornick.io> | 2013-03-23 10:20:43 -0400 |
|---|---|---|
| committer | Mark Cornick <mark@cornick.io> | 2013-03-23 10:20:43 -0400 |
| commit | a017d3f212919813031dc4c7da83aa45aa78102f (patch) | |
| tree | 32bf96037cbe52641a8fa0b91e4a3fe93288342b /src/_knife | |
| parent | Merge pull request #127 from glidenote/ag-completion (diff) | |
| download | zsh-completions-a017d3f212919813031dc4c7da83aa45aa78102f.tar zsh-completions-a017d3f212919813031dc4c7da83aa45aa78102f.tar.gz zsh-completions-a017d3f212919813031dc4c7da83aa45aa78102f.tar.bz2 zsh-completions-a017d3f212919813031dc4c7da83aa45aa78102f.tar.lz zsh-completions-a017d3f212919813031dc4c7da83aa45aa78102f.tar.xz zsh-completions-a017d3f212919813031dc4c7da83aa45aa78102f.tar.zst zsh-completions-a017d3f212919813031dc4c7da83aa45aa78102f.zip | |
Add completion for knife user commands
These commands were added in Chef 11.0.0.
Diffstat (limited to 'src/_knife')
| -rw-r--r-- | src/_knife | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -44,7 +44,7 @@ _knife() { case $state in knifecmd) - compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" environment exec index node recipe role search ssh status windows $cloudproviders + compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" environment user exec index node recipe role search ssh status windows $cloudproviders ;; knifesubcmd) case $words[2] in @@ -63,6 +63,9 @@ _knife() { environment) compadd -Q "$@" create delete edit "from file" list show ;; + user) + compadd -Q "$@" create delete edit list reregister show + ;; node) compadd -Q "$@" "from file" create show edit delete list run_list "bulk delete" ;; @@ -186,6 +189,10 @@ _chef_environments_remote() { (knife environment list | awk '{print $1}') } +_chef_users_remote() { + (knife user list | awk '{print $1}') +} + # The chef_x_local functions use the knife config to find the paths of relevant objects x to be uploaded to the server _chef_cookbooks_local() { (for i in $( grep cookbook_path $HOME/.chef/knife.rb | awk 'BEGIN {FS = "[" }; {print $2}' | sed 's/\,//g' | sed "s/'//g" | sed 's/\(.*\)]/\1/' ); do ls $i; done) |
