zsh: alias bat when available command is batcat

fix-ci
bretello 2023-09-02 15:15:52 +02:00
parent fbc6934f8f
commit 76579a603e
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 8 additions and 2 deletions

View File

@ -73,8 +73,14 @@ export ZSH_AUTOSUGGEST_STRATEGY=(history completion)
# less options
export LESS='-xRF-j12' # -j12: displays 12 lines before search results with / and ?
if [[ "$(command -v bat)" ]]; then
alias cat=bat
if [[ "$(command -v bat)" || "$(command -v batcat)" ]]; then
if [[ "$(command -v bat)" ]]; then
alias cat=bat
export PAGER=bat
else
alias cat=batcat
export PAGER=batcat
fi
export BAT_THEME="gruvbox-dark"
export BAT_PAGER="less $LESS"
export PAGER=bat