Save one process by exec-ing custom man
This commit is contained in:
parent
e988871cba
commit
94ead9f9c8
1 changed files with 19 additions and 18 deletions
37
bin/colorman
37
bin/colorman
|
@ -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 "$@"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue