I have the following LESS_TERMCAP settings:
# less config
export LESS=-R
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
export LESS_TERMCAP_so=$'\E[01;44;37m' # begin standout-mode
export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS_TERMCAP_us=$'\E[01;33m' # begin underline
export LESSOPEN='| /usr/bin/highlight -O ansi %s 2>/dev/null'
When I put into ~/.profile
, the less viewer gets absolutely messy. On the other hand, when I put into ~/.zshrc
(I am using zsh
), it works, why?
Since I was taught to keep the environment variables into non-login shell config files, such as ~/.profile
, I want to do so.
Further information:
tapyu@tapyu-ThinkPad-P73
OS: Ubuntu 20.04 focal
Kernel: x86_64 Linux 5.13.0-28-generic
Uptime: 2h 25m
Packages: 2559
Shell: zsh 5.8
Resolution: 2048x1152
DE: GNOME 3.36.5
WM: Mutter
WM Theme: Adwaita
GTK Theme: Yaru-dark [GTK2/3]
Icon Theme: Yaru
Font: Ubuntu 11
Disk: 123G / 217G (60%)
CPU: Intel Core i7-9750H @ 12x 4.5GHz [43.0°C]
GPU: Intel Corporation UHD Graphics 630 (Mobile)
NVIDIA Corporation GP107GLM [Quadro P620] (rev a1)
RAM: 4740MiB / 23681MiB
Best regards.
.profile
doesn't understand the syntax (which is not all that old - ymmv). – Thomas Dickey Dec 30 '21 at 19:07