# HG changeset patch # User Rok Strnisa # Date 1284649121 -3600 # Node ID 28cb75d03e398d2824e95e38732731ab2c25254e # Parent 69cd312600a049d9fd0b171b4bd64992bc9b27f8 [mq]: CA-35084-No-tab-completion-for-xe-vm-param-get-param-name-command diff --git a/ocaml/xe-cli/bash-completion b/ocaml/xe-cli/bash-completion --- a/ocaml/xe-cli/bash-completion +++ b/ocaml/xe-cli/bash-completion @@ -83,13 +83,23 @@ _xe() return 0 ;; - # param name is used by *-param-add + # param name is used by *-param-add, *-param-remove, and *-param-get param-name) if echo ${COMP_WORDS[1]} | grep "param-add" > /dev/null; then class=`echo ${COMP_WORDS[1]} | sed s/-param-add//g` paramsset=`${xe} ${class}-list params=all 2>/dev/null | grep "SRW\|MRW" | cut -d\( -f 1 | cut -d: -f1 | sed s/\ *//` IFS=$'\n,' COMPREPLY=( $(compgen -W "${paramsset}" -- ${value}) ) return 0 + elif echo ${COMP_WORDS[1]} | grep "param-remove" > /dev/null; then + class=`echo ${COMP_WORDS[1]} | sed s/-param-remove//g` + paramsset=`${xe} ${class}-list params=all 2>/dev/null | grep "SRW\|MRW" | cut -d\( -f 1 | cut -d: -f1 | sed s/\ *//` + IFS=$'\n,' COMPREPLY=( $(compgen -W "${paramsset}" -- ${value}) ) + return 0 + elif echo ${COMP_WORDS[1]} | grep "param-get" > /dev/null; then + class=`echo ${COMP_WORDS[1]} | sed s/-param-get//g` + paramsset=`${xe} ${class}-list params=all 2>/dev/null | cut -d\( -f 1 | cut -d: -f1 | sed s/\ *//` + IFS=$'\n,' COMPREPLY=( $(compgen -W "${paramsset}" -- ${value}) ) + return 0 fi ;; cd-name)