Save one process by exec-ing custom man

This commit is contained in:
Fernando Schauenburg 2021-07-22 15:25:11 +02:00
parent e988871cba
commit 94ead9f9c8

View file

@ -4,20 +4,20 @@
Reset=$(tput sgr0)
Base03=8
Base02=0
#Base01=10
#Base00=11
#Base0=12
#Base1=14
#Base2=7
Base01=10
Base00=11
Base0=12
Base1=14
Base2=7
Base3=15
#Red=1
#Orange=9
Red=1
Orange=9
Yellow=3
#Green=2
Green=2
Cyan=6
Blue=4
#Violet=13
#Magenta=5
Violet=13
Magenta=5
if [ "$BACKGROUND" = "light" ]; then
standout=$( printf '%s\n' "setaf $Base3" "setab $Cyan" | tput -S)
@ -29,12 +29,13 @@ else
underline=$(printf '%s\n' "setaf $Base3" "smul" | tput -S)
fi
LESS_TERMCAP_so="$standout" \
LESS_TERMCAP_md="$bold" \
LESS_TERMCAP_us="$underline" \
LESS_TERMCAP_se="$Reset" \
LESS_TERMCAP_me="$Reset" \
LESS_TERMCAP_ue="$Reset" \
GROFF_NO_SGR=1 \
man "$@"
exec env \
LESS_TERMCAP_so="$standout" \
LESS_TERMCAP_md="$bold" \
LESS_TERMCAP_us="$underline" \
LESS_TERMCAP_se="$Reset" \
LESS_TERMCAP_me="$Reset" \
LESS_TERMCAP_ue="$Reset" \
GROFF_NO_SGR=1 \
man "$@"