summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-13 13:58:56 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-13 13:58:56 -0700
commitf233c5bc3e026301ad4cb67e1f3ce5c1b6f8fe94 (patch)
tree7123d45431d14dfe621e1914871358dfa7446ffc /etc
parentbec2d770cc82566e17e5aff1850037a4fec3e34c (diff)
downloadvyatta-op-f233c5bc3e026301ad4cb67e1f3ce5c1b6f8fe94.tar.gz
vyatta-op-f233c5bc3e026301ad4cb67e1f3ce5c1b6f8fe94.zip
don't run commands in subshell
To fix Bug 2867, don't run commands in sub shell (ie eval) and have pager quit on interrupt.
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/10vyatta-op7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op
index 538d5c0..bb2067e 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/10vyatta-op
@@ -22,6 +22,7 @@
test -z "$_vyatta_default_pager" && \
declare -r _vyatta_default_pager="less\
--QUIT-AT-EOF\
+ --quit-on-intr\
--quit-if-one-screen\
--LONG-PROMPT\
--RAW-CONTROL-CHARS\
@@ -285,7 +286,7 @@ _vyatta_op_expand ()
_vyatta_op_help "$cur" \
${_vyatta_op_noncompletions[@]} \
${_vyatta_op_completions[@]} \
- | eval ${VYATTA_PAGER:-cat}
+ | ${VYATTA_PAGER:-cat}
COMPREPLY=( "" " " )
_vyatta_op_last_comp=${_vyatta_op_last_comp_init}
else
@@ -319,9 +320,9 @@ _vyatta_op_run ()
local ret=0
if [ -n "$run_cmd" ]; then
if [[ -t 1 && "$1" == "show" ]] ; then
- ( eval "$run_cmd" ) | eval "${VYATTA_PAGER:-cat}"
+ $run_cmd | ${VYATTA_PAGER:-cat}
else
- eval "$run_cmd"
+ $run_cmd
fi
else
echo "Incomplete command" >&2