From e177a0716f2bf1c79b84315b3d538d6fdbb2aa93 Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Sat, 27 Jul 2024 09:20:08 +0200 Subject: [PATCH] improve more/less --- config/home/bashrc.br | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/home/bashrc.br b/config/home/bashrc.br index 57e30e9..cfb89fa 100644 --- a/config/home/bashrc.br +++ b/config/home/bashrc.br @@ -98,13 +98,16 @@ _var_del PATH /snap/bin # enable core file ulimit -Sc 102400 # in 1024 bytes, 100Mb -# ... and set PAGER to less (for man(1) and others) +# Set pager: "less" is prefered over "more". if hash less 2>/dev/null; then export PAGER=less # do not clear screen after "less", exit immediately if one page only - export LESS="--quit-if-one-screen --no-init" - # ... and just alias more... to less ;-) + export LESS="--quit-if-one-screen --quit-at-eof --no-init" alias more=less +else + export MORE="--exit-on-eof --silent" + export PAGER=more + alias less=more fi # no output split for dc and bc / make bc silent