summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@io.vyatta.com>2007-12-05 12:32:59 -0800
committerTom Grennan <tgrennan@io.vyatta.com>2007-12-05 12:32:59 -0800
commit5e0e3f2e6d589d5912776b01346b15adf5c44982 (patch)
treeb8a31efee822aa24be14c57b9fb427a5ca4277b8 /etc
parent4dbba52a5b7e97d55ea7c4f957f594204350b9b2 (diff)
downloadvyatta-op-5e0e3f2e6d589d5912776b01346b15adf5c44982.tar.gz
vyatta-op-5e0e3f2e6d589d5912776b01346b15adf5c44982.zip
only use VYATTA_PAGER if stdout is a terminal
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/10vyatta-op2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op
index a9c5492..5118831 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/10vyatta-op
@@ -277,7 +277,7 @@ _vyatta_op_run ()
local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run)
local ret=0
if [ -n "$run_cmd" ]; then
- if [ "$1" == "show" ] ; then
+ if [[ -t 1 && "$1" == "show" ]] ; then
( eval "$run_cmd" ) | eval "${VYATTA_PAGER:-cat}"
else
eval "$run_cmd"