From c4cc74b668f3b66ebf25e31fcc35ca72bbd05ee3 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Mon, 4 May 2020 13:22:03 +0200 Subject: [PATCH] Add enabling of colored output for less --- dotfiles/bash/bashrc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dotfiles/bash/bashrc b/dotfiles/bash/bashrc index 2f558f8..0ccf304 100644 --- a/dotfiles/bash/bashrc +++ b/dotfiles/bash/bashrc @@ -37,13 +37,13 @@ fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; + xterm-color|*-256color|xterm-kitty) color_prompt=yes;; esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt -force_color_prompt=yes +#force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then @@ -116,6 +116,15 @@ if ! shopt -oq posix; then fi fi +# Enable colored less output +export LESS_TERMCAP_mb=$'\e[1;32m' +export LESS_TERMCAP_md=$'\e[1;32m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[01;33m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;4;31m' + # Enable bash-git-prompt if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then