diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-08-31 12:33:47 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-08-31 12:37:59 -0500 |
commit | c66cc74372aa35fe7520291aa8bcb502cb911845 (patch) | |
tree | faf44c1b18a339604353bf5b693c920a82e1c7ba /etc | |
parent | f507911422a71b20f37b129a23633c0648780738 (diff) | |
download | vyatta-op-c66cc74372aa35fe7520291aa8bcb502cb911845.tar.gz vyatta-op-c66cc74372aa35fe7520291aa8bcb502cb911845.zip |
Fix completion for user wildcards
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index 6be6b81..5b2312c 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -180,7 +180,11 @@ _vyatta_op_set_node_path () _vyatta_op_node_path=$vyatta_op_templates for (( i=0 ; i<COMP_CWORD ; i++ )) ; do # expand the command so completion continues to work with short versions - node=$(_vyatta_op_conv_node_path $_vyatta_op_node_path ${COMP_WORDS[i]}) + if [[ "${COMP_WORDS[i]}" == "*" ]]; then + node="node.tag" # user defined wildcars are always tag nodes + else + node=$(_vyatta_op_conv_node_path $_vyatta_op_node_path ${COMP_WORDS[i]}) + fi if [ -f "${_vyatta_op_node_path}/$node/node.def" ] ; then _vyatta_op_node_path+=/$node elif [ -f ${_vyatta_op_node_path}/node.tag/node.def ] ; then |