diff options
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 1 | ||||
-rw-r--r-- | functions/interpreter/vyatta-op-run | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index 5b2312c..c1d27c8 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -107,7 +107,6 @@ _vyatta_op_default_expand () _vyatta_op_expand else # after the first word => cannot be vyatta command so use original default - compopt -o filenames _filedir_xspec fi } diff --git a/functions/interpreter/vyatta-op-run b/functions/interpreter/vyatta-op-run index 2d578b9..8508c71 100644 --- a/functions/interpreter/vyatta-op-run +++ b/functions/interpreter/vyatta-op-run @@ -162,6 +162,7 @@ _vyatta_op_run () local ret=0 local cmd_regex="^(LESSOPEN=|less|pager|tail|/opt/vyatta/bin/vyatta-tshark-interface-port.pl).*" if [ -n "$run_cmd" ]; then + eval $restore_shopts if [[ -t 1 && "${args[1]}" == "show" && ! $run_cmd =~ $cmd_regex ]] ; then eval "($run_cmd) | ${VYATTA_PAGER:-cat}" else @@ -169,9 +170,9 @@ _vyatta_op_run () fi else echo -ne "\n Incomplete command: ${args[@]}\n\n" >&2 + eval $restore_shopts ret=1 fi - eval $restore_shopts return $ret } |