mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-12-22 08:21:40 +01:00
zsh: cleanup bat configuration
This commit is contained in:
parent
b05fde87c2
commit
0c7d0ec24f
|
@ -84,23 +84,24 @@ export ZSH_AUTOSUGGEST_COMPLETION_IGNORE='* \#*' # prevent completion for commen
|
|||
export LESS='-xRF-j12' # -j12: displays 12 lines before search results with / and ?
|
||||
if [[ "$(command -v bat)" || "$(command -v batcat)" ]]; then
|
||||
if [[ "$(command -v bat)" ]]; then
|
||||
alias cat=bat
|
||||
export PAGER=bat
|
||||
cmd=bat
|
||||
else
|
||||
alias cat=batcat
|
||||
export PAGER=batcat
|
||||
cmd=batcat
|
||||
fi
|
||||
|
||||
alias cat=$cmd
|
||||
export PAGER=$cmd
|
||||
export BAT_PAGER="less $LESS"
|
||||
|
||||
if [[ -n $THEME_PREFER_LIGHT ]]; then
|
||||
export BAT_THEME="gruvbox-light"
|
||||
else
|
||||
export BAT_THEME="gruvbox-dark"
|
||||
fi
|
||||
export BAT_PAGER="less $LESS"
|
||||
export PAGER=bat
|
||||
|
||||
## this breaks symlink testing with [ -h ], best not to activate it
|
||||
# alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
|
||||
alias bathelp='bat --language=help --style=plain'
|
||||
alias bathelp="$cmd --language=help --style=plain"
|
||||
alias -g -- --help='--help 2>&1 | bathelp '
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user