summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/10vyatta-op14
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op
index ebff99f..b0d5dc9 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/10vyatta-op
@@ -19,17 +19,20 @@
#
# **** End License ****
-test -z "$_vyatta_default_pager" && \
- declare -r _vyatta_default_pager="less\
+test -z "$_vyatta_less_options" && \
+ declare -r _vyatta_less_options="\
--QUIT-AT-EOF\
--quit-if-one-screen\
--LONG-PROMPT\
--RAW-CONTROL-CHARS\
--squeeze-blank-lines\
+ --no-init"
+test -z "$_vyatta_default_pager" && \
+ declare -r _vyatta_default_pager="less
--buffers=64\
--auto-buffers\
- --no-init\
- --no-lessopen"
+ --no-lessopen\
+ $_vyatta_less_options"
declare -x VYATTA_PAGER=$_vyatta_default_pager
_vyatta_op_do_key_bindings ()
@@ -318,7 +321,8 @@ _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 [[ -t 1 && "$1" == "show" ]] ; then
+ if [[ -t 1 && "$1" == "show" && \
+ ! $run_cmd =~ ^\(less\|more\|most\|pager\|tail\).* ]] ; then
eval "($run_cmd) | ${VYATTA_PAGER:-cat}"
else
eval "$run_cmd"