From 0bb4ff8782c1e36d273bbe155d68d16dfb2b71d8 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 2 Dec 2022 10:38:57 +0100 Subject: [PATCH] Use bat for GIT_PAGER if available --- zshenv | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/zshenv b/zshenv index 76fb969..1adc81d 100644 --- a/zshenv +++ b/zshenv @@ -24,24 +24,31 @@ export SHELL='/bin/zsh' # PATH export PATH="/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/games:/sbin:$HOME/bin:/opt:/usr/local/games:$HOME/.virtualenvs/bin:$HOME/.local/bin" -# Default soft {{{ -## For crontab, git,… +# Default soft export VISUAL=vim export EDITOR=vim -## web browser +## web browser {{{ if [ $(command -v qutebrowser) ]; then export BROWSER=qutebrowser elif [ $(command -v firefox) ]; then export BROWSER=firefox fi -## Pager (man,…) +## }}} +## Pager (man,…) {{{ if [ $(command -v vimmanpager) ]; then export PAGER=vimmanpager else export PAGER=less fi alias zless=$PAGER -# }}} +## }}} +## Git pager {{{ +if [ $(command -v bat) ]; then + export GIT_PAGER=bat +else + export GIT_PAGER="less -F -X" +fi +## }}} # Colors definition for less {{{ export LESS_TERMCAP_mb=$'\E[01;31m' # début de blink