From 5e0e3f2e6d589d5912776b01346b15adf5c44982 Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Wed, 5 Dec 2007 12:32:59 -0800 Subject: only use VYATTA_PAGER if stdout is a terminal --- etc/bash_completion.d/10vyatta-op | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') 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" -- cgit v1.2.3