summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-14 08:51:57 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-14 08:51:57 -0700
commit67ebf64095378d5108d01a58f3aec7433258eb55 (patch)
treeb51feb39dc856ff62a6a38efaf9d317f9ccd3605
parentf233c5bc3e026301ad4cb67e1f3ce5c1b6f8fe94 (diff)
downloadvyatta-op-67ebf64095378d5108d01a58f3aec7433258eb55.tar.gz
vyatta-op-67ebf64095378d5108d01a58f3aec7433258eb55.zip
Need to run commands via eval
Revert "don't run commands in subshell" This change fixed the interrupting pipeline problem, but broke the ability to put builtin shell commands in run: tag. This reverts commit f233c5bc3e026301ad4cb67e1f3ce5c1b6f8fe94.
-rw-r--r--etc/bash_completion.d/10vyatta-op7
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op
index bb2067e..538d5c0 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/10vyatta-op
@@ -22,7 +22,6 @@
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\
@@ -286,7 +285,7 @@ _vyatta_op_expand ()
_vyatta_op_help "$cur" \
${_vyatta_op_noncompletions[@]} \
${_vyatta_op_completions[@]} \
- | ${VYATTA_PAGER:-cat}
+ | eval ${VYATTA_PAGER:-cat}
COMPREPLY=( "" " " )
_vyatta_op_last_comp=${_vyatta_op_last_comp_init}
else
@@ -320,9 +319,9 @@ _vyatta_op_run ()
local ret=0
if [ -n "$run_cmd" ]; then
if [[ -t 1 && "$1" == "show" ]] ; then
- $run_cmd | ${VYATTA_PAGER:-cat}
+ ( eval "$run_cmd" ) | eval "${VYATTA_PAGER:-cat}"
else
- $run_cmd
+ eval "$run_cmd"
fi
else
echo "Incomplete command" >&2