Colored man pages with less and TERMCAP #10087
-
Hi, While the below snippet works in Zsh with Wezterm by rendering colored man pages export LESS -RF
export LESS_TERMCAP_mb=$'\e[01;31m'
export LESS_TERMCAP_md=$'\e[01;38;5;74m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[38;5;246m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[04;38;5;146m' The following adaptation in Fish and Wezterm does not render man pages in color set -gx LESS -RF
set -gx LESS_TERMCAP_mb '\e[01;31m'
set -gx LESS_TERMCAP_md '\e[01;38;5;74m'
set -gx LESS_TERMCAP_me '\e[0m'
set -gx LESS_TERMCAP_se '\e[0m'
set -gx LESS_TERMCAP_so '\e[38;5;246m'
set -gx LESS_TERMCAP_ue '\e[0m'
set -gx LESS_TERMCAP_us '\e[04;38;5;146m' Probably ANSI color escape sequences have to be defined in a special way that I cannot figure out. Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
faho
Nov 7, 2023
Replies: 1 comment
-
You want the https://fishshell.com/docs/current/fish_for_bash_users.html#quoting:
That means: set -gx LESS -RF
set -gx LESS_TERMCAP_mb \e'[01;31m'
set -gx LESS_TERMCAP_md \e'[01;38;5;74m'
set -gx LESS_TERMCAP_me \e'[0m'
set -gx LESS_TERMCAP_se \e'[0m'
set -gx LESS_TERMCAP_so \e'[38;5;246m'
set -gx LESS_TERMCAP_ue \e'[0m'
set -gx LESS_TERMCAP_us \e'[04;38;5;146m' Alternatively, use set -gx LESS -RF
set -gx LESS_TERMCAP_mb (set_color --bold red) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
volodymyrprokopyuk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You want the
\e
to appear outside of quotes.https://fishshell.com/docs/current/fish_for_bash_users.html#quoting:
That means:
Alternatively, use
set_color
: