Set colors for man to match the background

This commit is contained in:
Peter J. Holzer 2024-04-18 12:34:10 +02:00
parent 6460b497a9
commit 03cc524476
1 changed files with 20 additions and 8 deletions

12
.zshrc
View File

@ -67,6 +67,17 @@ dup(){
cls() { clear; true }
man () {
if [[ "$BG" = "dark" ]]
then
LESS_TERMCAP_mb=$'\e'"[1;31m" \
LESS_TERMCAP_md=$'\e'"[1;32m" \
LESS_TERMCAP_me=$'\e'"[0m" \
LESS_TERMCAP_se=$'\e'"[0m" \
LESS_TERMCAP_so=$'\e'"[1;44;33m" \
LESS_TERMCAP_ue=$'\e'"[0m" \
LESS_TERMCAP_us=$'\e'"[36m" \
command man "$@"
else
LESS_TERMCAP_mb=$'\e'"[1;31m" \
LESS_TERMCAP_md=$'\e'"[1;38;5;88m" \
LESS_TERMCAP_me=$'\e'"[0m" \
@ -75,6 +86,7 @@ man () {
LESS_TERMCAP_ue=$'\e'"[0m" \
LESS_TERMCAP_us=$'\e'"[1;38;5;22m" \
command man "$@"
fi
}
venv() {