From 2a23ec27d81062417775d1022860206b48b1412d Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sun, 23 Oct 2022 16:55:30 +0200 Subject: 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. --- zshrc | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'zshrc') diff --git a/zshrc b/zshrc index 607fec77..abb8f066 100644 --- a/zshrc +++ b/zshrc @@ -138,20 +138,6 @@ ppscm () { source-highlight -s scheme -f esc | less -RSM } -# Less: use pretty colours for bold/underline/... -- mostly in `man' -# https://wiki.archlinux.org/index.php/Color_output_in_console#less -# See terminfo(5) for tput code names. -# blink -> italic white-on-red -export LESS_TERMCAP_mb=$'\e'"[${color[standout]}m${fg[white]}${bg[red]}" -# bold -> bold blue -export LESS_TERMCAP_md="${fg_bold[blue]}" -# reverse video -> reverse, bright yellow background -export LESS_TERMCAP_so=$'\e'"[${color[reverse]}m${fg_bold[yellow]}" -# underline -> italic green -export LESS_TERMCAP_us=$'\e'"[${color[standout]}m${fg[green]}" -# reset bold/blink, reverse video, underline -export LESS_TERMCAP_me="$reset_color" LESS_TERMCAP_se="$reset_color" LESS_TERMCAP_ue="$reset_color" - ## Plugins _load_plugin () { local _try_path -- cgit v1.2.3