From 97c4207b38fdea46a6feab6c5536703614f15e8e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 10 Oct 2019 20:28:02 +0200 Subject: [PATCH] [UPDATE][SHELL] Make less clear screen on start-up If you don't have this option, less will just start outputting from wherever your cursor was (so the line where you were writing your command), but any movement would make it snap to the top of the terminal. This makes it clear the screen before doing its first draw, making the output systematically start from the top. --- shell/.profile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/.profile b/shell/.profile index 09cdb7f..2996f25 100644 --- a/shell/.profile +++ b/shell/.profile @@ -33,8 +33,8 @@ if { [ -n "$BASH_VERSION" ] && shopt -q login_shell; } || # Use less as my default pager export PAGER=less - # Allow for colorful man pages, clear the screen on exit - export LESS='-R -+X' + # Allow for colorful man pages, clear the screen on start and exit + export LESS='-R -+X -c' export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink export LESS_TERMCAP_md=$'\E[1;36m' # begin bold export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink