diff options
Diffstat (limited to 'etc/bash_completion.d/10vyatta-op')
-rw-r--r-- | etc/bash_completion.d/10vyatta-op | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index cf40e59..9da12aa 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -207,11 +207,20 @@ _vyatta_op_run () tpath+=/node.tag else echo "Invalid command" >&2 + eval $restore_shopts return 1 fi done - eval "$(_vyatta_op_get_node_def_field $tpath/node.def run)" + local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run) + local ret=0 + if [ -n "$run_cmd" ]; then + eval "$run_cmd" + else + echo "Invalid command" >&2 + ret=1 + fi eval $restore_shopts + return $ret } # don't initialize if we are in configure mode |