summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-07-27 16:11:41 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-07-27 16:11:41 -0500
commit35cd558822cf505d3bf810775b7f78557ac467ba (patch)
treea1e1fab1ddc560eb28cd292d19b43348e4ff2842
parentef679c6373e67d25838042999a67425f381b5f1c (diff)
downloadvyatta-op-35cd558822cf505d3bf810775b7f78557ac467ba.tar.gz
vyatta-op-35cd558822cf505d3bf810775b7f78557ac467ba.zip
Bugfix 7380: fix pager exceptions regex.
-rw-r--r--etc/bash_completion.d/vyatta-op-run12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/bash_completion.d/vyatta-op-run b/etc/bash_completion.d/vyatta-op-run
index 053dc0e..8e73773 100644
--- a/etc/bash_completion.d/vyatta-op-run
+++ b/etc/bash_completion.d/vyatta-op-run
@@ -67,13 +67,13 @@ _vyatta_op_run ()
local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run)
local ret=0
+ local cmd_regex="^(LESSOPEN=|less|pager|tail|/opt/vyatta/bin/vyatta-tshark-interface-port.pl).*"
if [ -n "$run_cmd" ]; then
- if [[ -t 1 && "$1" == "show" && \
- ! $run_cmd =~ ^\(LESSOPEN=\|less\|pager\|tail\|/opt/vyatta/bin/vyatta-tshark-interface-port.pl\).* ]] ; then
- eval "($run_cmd) | ${VYATTA_PAGER:-cat}"
- else
- eval "$run_cmd"
- fi
+ if [[ -t 1 && "$1" == "show" && ! $run_cmd =~ $cmd_regex ]] ; then
+ eval "($run_cmd) | ${VYATTA_PAGER:-cat}"
+ else
+ eval "$run_cmd"
+ fi
else
echo "Incomplete command" >&2
ret=1