diff options
author | Timo Wilken | 2022-10-23 16:55:30 +0200 |
---|---|---|
committer | Timo Wilken | 2022-10-23 16:55:30 +0200 |
commit | 2a23ec27d81062417775d1022860206b48b1412d (patch) | |
tree | 8807d6f21122e1e65d36d75719e5948a80262e7f /lesskey | |
parent | c493f3eb231e631d9258017ea6006e057cd3a0c5 (diff) |
Fix colours in less
In order for `LESS_TERMCAP_*` variables to be processed properly when
displaying man pages, we need `GROFF_NO_SGR=1`.
Also, put `LESS_TERMCAP_*` variables into `lesskey` so they don't
pollute the normal shell environment.
Diffstat (limited to 'lesskey')
-rw-r--r-- | lesskey | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -16,3 +16,18 @@ LESSHISTSIZE=10000 # *? setting is shared between LESS{,UTF}BINFMT, with the latter's setting taking priority LESSBINFMT=*k%02X LESSUTFBINFMT=U+%04lX +# Use pretty colours for bold/underline/... -- mostly in `man' +# https://wiki.archlinux.org/index.php/Color_output_in_console#less +# Note: these values are verbatim as less doesn't support escaping +# characters in lesskey (I think). +# blink -> italic white-on-red +LESS_TERMCAP_mb=[03;37;41m +# bold -> bold blue +LESS_TERMCAP_md=[01;34m +LESS_TERMCAP_me=[00m +# reverse video -> reverse, bright yellow background +LESS_TERMCAP_so=[07;01;33m +LESS_TERMCAP_se=[00m +# underline -> italic green +LESS_TERMCAP_us=[03;32m +LESS_TERMCAP_ue=[00m |