Use bat for GIT_PAGER if available

This commit is contained in:
Jeremy Gardais 2022-12-02 10:38:57 +01:00
parent bced7c78f1
commit 0bb4ff8782
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 12 additions and 5 deletions

17
zshenv
View File

@ -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