Add configuration for bat

This commit is contained in:
Alexander Hess 2026-08-03 02:57:48 +02:00
commit fbc2e0695a
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
4 changed files with 40 additions and 0 deletions

View file

@ -47,6 +47,18 @@ export LESS="--chop-long-lines --ignore-case --LONG-PROMPT --no-init --quit-if-o
[ -f "$XDG_CONFIG_HOME/shell/locale" ] && . "$XDG_CONFIG_HOME/shell/locale"
# ~/.local/bin/dotfiles-install symlinks Debian's `batcat` to ~/.local/bin/bat
for _bat in batcat bat; do
if _command_exists "$_bat"; then
export MANPAGER="sh -c 'col -bx | $_bat --language man --plain'"
export MANROFFOPT="-c"
break
fi
done
unset _bat
# Move common tools' config and cache files into XDG directories
export BAT_CONFIG_PATH="$XDG_CONFIG_HOME/bat/config"
export LESSHISTFILE="$XDG_STATE_HOME/less/history"