From 771232217e6621a0182f941402b06059e0f14a6c Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 3 Feb 2022 17:21:37 +0100 Subject: [PATCH] zsh:zprofile: Always export `$LESS*` variables --- .config/zsh/.zprofile | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index b63f9af..b71979d 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -62,23 +62,20 @@ elif (( $+commands[nano] )); then fi # Less -if (( $+commands[less] )); then - # https://www.tecmint.com/view-colored-man-pages-in-linux/ - export LESS_TERMCAP_mb=$'\e[1;32m' - export LESS_TERMCAP_md=$'\e[1;32m' - export LESS_TERMCAP_me=$'\e[0m' - export LESS_TERMCAP_se=$'\e[0m' - export LESS_TERMCAP_so=$'\E[01;44;33m' - export LESS_TERMCAP_ue=$'\e[0m' - export LESS_TERMCAP_us=$'\e[1;4;31m' +# https://www.tecmint.com/view-colored-man-pages-in-linux/ +export LESS_TERMCAP_mb=$'\e[1;32m' +export LESS_TERMCAP_md=$'\e[1;32m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\E[01;44;33m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;4;31m' - # Enable mouse wheel support - LESS+="${LESS:+ }--mouse --wheel-lines=3" - # Display ANSI color escape sequences - LESS+="${LESS:+ }-R" - - export LESS -fi +# Enable mouse wheel support +LESS+="${LESS:+ }--mouse --wheel-lines=3" +# Display ANSI color escape sequences +LESS+="${LESS:+ }-R" +export LESS # Show also hidden files per default but ignore files in '.git' directories. if (( $+commands[rg] )); then