diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-09-03 10:49:19 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-09-03 10:49:19 -0700 |
commit | c602f8e70435f8337ddafcb067bab230dd2a093c (patch) | |
tree | e0dad97468ce5e43810067086a0497a181553203 /etc | |
parent | 0fdb23d33f7027c7114d741f96cfa0bc97f1f8b8 (diff) | |
download | vyatta-op-c602f8e70435f8337ddafcb067bab230dd2a093c.tar.gz vyatta-op-c602f8e70435f8337ddafcb067bab230dd2a093c.zip |
now supports quoted values for op mode commands
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash_completion.d/10vyatta-op | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index 4735462..66154f8 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -306,17 +306,22 @@ _vyatta_op_run () _vyatta_op_last_comp=${_vyatta_op_last_comp_init} false; estat=$? - for arg ; do - if [ -f "$tpath/$arg/node.def" ] ; then - tpath+=/$arg - elif [ -f $tpath/node.tag/node.def ] ; then - tpath+=/node.tag - else - echo "Invalid command" >&2 + + i=1 + for arg in "$@" + do + if [ -f "$tpath/$arg/node.def" ] ; then + tpath+=/$arg + elif [ -f $tpath/node.tag/node.def ] ; then + tpath+=/node.tag + else + echo "Invalid command" >&2 eval $restore_shopts - return 1 - fi + return 1 + fi + let "i+=1" done + local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run) local ret=0 if [ -n "$run_cmd" ]; then |