diff options
Diffstat (limited to 'etc/bash_completion.d')
-rwxr-xr-x | etc/bash_completion.d/20vyatta-cfg | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 463b383..4ad86ce 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -440,8 +440,14 @@ vyatta_parse_tmpl () vyatta_cfg_comp_help=$(vyatta_parse_tmpl_comp_fields $1 "comp_help") if (( ${#vyatta_cfg_allowed[@]} == 0 )); then - local ares=$(eval "$acmd") - eval "vyatta_cfg_allowed=( $ares )" + local -a ares=( $(eval "$acmd") ) + for (( i=0 ; i<${#ares[@]} ; i++ )); do + if [[ "${ares[i]}" != \<*\> ]]; then + vyatta_cfg_allowed+=( "${ares[i]}" ) + else + vyatta_cfg_allowed+=( "" ) + fi + done fi if [ -z "$vyatta_cfg_help" ]; then vyatta_cfg_help='<No help text available>' |