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 # 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" 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 {{{ # Default soft
## For crontab, git,…
export VISUAL=vim export VISUAL=vim
export EDITOR=vim export EDITOR=vim
## web browser ## web browser {{{
if [ $(command -v qutebrowser) ]; then if [ $(command -v qutebrowser) ]; then
export BROWSER=qutebrowser export BROWSER=qutebrowser
elif [ $(command -v firefox) ]; then elif [ $(command -v firefox) ]; then
export BROWSER=firefox export BROWSER=firefox
fi fi
## Pager (man,…) ## }}}
## Pager (man,…) {{{
if [ $(command -v vimmanpager) ]; then if [ $(command -v vimmanpager) ]; then
export PAGER=vimmanpager export PAGER=vimmanpager
else else
export PAGER=less export PAGER=less
fi fi
alias zless=$PAGER 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 {{{ # Colors definition for less {{{
export LESS_TERMCAP_mb=$'\E[01;31m' # début de blink export LESS_TERMCAP_mb=$'\E[01;31m' # début de blink