Setting LESS_TERMCAP_* variables with $(tput ...) in ~/.profile not working
2
votes
1
answer
525
views
This is my
~/.bashrc
:
# ...unnecessary lines skipped...
# man colors
LESS_TERMCAP_mb=$(tput blink) # start bold
LESS_TERMCAP_md=$(tput setaf 2 ; tput bold) # start bold
LESS_TERMCAP_me=$(tput sgr0) # turn off bold, blink and underline
LESS_TERMCAP_so=$(tput smso) # start standout (reverse video)
LESS_TERMCAP_se=$(tput rmso) # stop standout
LESS_TERMCAP_us=$(tput smul) # start underline
LESS_TERMCAP_ue=$(tput rmul) # stop underline
export LESS_TERMCAP_mb
export LESS_TERMCAP_md
export LESS_TERMCAP_me
export LESS_TERMCAP_so
export LESS_TERMCAP_se
export LESS_TERMCAP_us
export LESS_TERMCAP_ue
This works, I can see colors in man pages. But when I move that lines from ~/.bashrc
to ~/.profile
(and re-login), the colors in man pages disappears.
I really want to use tput
because it is more clear than a heap of control symbols.
Why do tput
not working from .profile
?
Asked by Alexander
(93 rep)
Oct 9, 2021, 10:03 AM
Last activity: Apr 8, 2022, 10:54 AM
Last activity: Apr 8, 2022, 10:54 AM