]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CA-34457 tab-completion for xe subject-role-add role-name=
authorThomas Sanders <thomas.sanders@citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
committerThomas Sanders <thomas.sanders@citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
The bash-completion file now has a section for role-name.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
ocaml/xe-cli/bash-completion

index 193eeaaea97d297ac67bd00783423298e5e938c2..b39d89936dea1ca130a62fecb34024ad9ecb7f94 100755 (executable)
@@ -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}) )