summaryrefslogtreecommitdiff
path: root/plugins/knife/_knife
diff options
context:
space:
mode:
authorMatt Outten <moutten@squaremouth.com>2011-11-16 11:14:26 -0500
committerMatt Outten <moutten@squaremouth.com>2011-11-16 11:14:26 -0500
commit10618f323f2915c2a7281e258a42d05faf1cc1af (patch)
tree9f1de8291e190add8adc82265dd6c6753abb114e /plugins/knife/_knife
parent757fa3314d1c041ab715dbda838f3e9b2ff9ce17 (diff)
downloadzsh-10618f323f2915c2a7281e258a42d05faf1cc1af.tar.gz
zsh-10618f323f2915c2a7281e258a42d05faf1cc1af.tar.bz2
zsh-10618f323f2915c2a7281e258a42d05faf1cc1af.zip
Add the --format tag to knife list commands
This commit adds the --format tag to all of the autocompletion functions. The default format changed from json to a "human readable" format as of version 0.10. This change should be backward compatible. Alternatively, these commands could be simplified by using the new default human readable format.
Diffstat (limited to 'plugins/knife/_knife')
-rw-r--r--plugins/knife/_knife12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/knife/_knife b/plugins/knife/_knife
index 7f8c95ee5..f336380a1 100644
--- a/plugins/knife/_knife
+++ b/plugins/knife/_knife
@@ -138,27 +138,27 @@ _knife_options3() {
# The chef_x_remote functions use knife to get a list of objects of type x on the server
_chef_roles_remote() {
- (knife role list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
+ (knife role list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
}
_chef_clients_remote() {
- (knife client list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
+ (knife client list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
}
_chef_nodes_remote() {
- (knife node list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
+ (knife node list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
}
_chef_cookbooks_remote() {
- (knife cookbook list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
+ (knife cookbook list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
}
_chef_sitecookbooks_remote() {
- (knife cookbook site list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
+ (knife cookbook site list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
}
_chef_data_bags_remote() {
- (knife data bag list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
+ (knife data bag list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
}
# The chef_x_local functions use the knife config to find the paths of relevant objects x to be uploaded to the server