From: Thomas Sanders Date: Wed, 26 Jan 2011 17:39:04 +0000 (+0000) Subject: CA-34457 tab-completion for xe subject-role-add role-name= X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5d1ed18d560be5dca2e70c5a034d046809e05336;p=xcp%2Fxen-api.git CA-34457 tab-completion for xe subject-role-add role-name= The bash-completion file now has a section for role-name. Signed-off-by: Thomas Sanders --- diff --git a/ocaml/xe-cli/bash-completion b/ocaml/xe-cli/bash-completion index 193eeaae..b39d8993 100755 --- a/ocaml/xe-cli/bash-completion +++ b/ocaml/xe-cli/bash-completion @@ -210,6 +210,12 @@ _xe() COMPREPLY=( $(compgen -W "monday,tuesday,wednesday,thursday,friday,saturday,sunday " -- ${LAST_VALUE}) ) return 0 ;; + role-name) + IFS=$'\n,' + LAST_VALUE=`echo ${value}|gawk 'BEGIN{FS=" "}{print $NF}'` + COMPREPLY=( $(compgen -W "vm-power-admin,vm-admin,vm-operator,read-only,pool-operator,pool-admin" -- ${LAST_VALUE}) ) + return 0 + ;; edition) # for host-apply-edition (licensing) IFS=$'\n,' COMPREPLY=( $(compgen -W "free ,enterprise ,platinum ,enterprise-xd " -- ${value}) )