mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +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 ?
|
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)" || "$(command -v batcat)" ]]; then
|
||||||
if [[ "$(command -v bat)" ]]; then
|
if [[ "$(command -v bat)" ]]; then
|
||||||
alias cat=bat
|
cmd=bat
|
||||||
export PAGER=bat
|
|
||||||
else
|
else
|
||||||
alias cat=batcat
|
cmd=batcat
|
||||||
export PAGER=batcat
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
alias cat=$cmd
|
||||||
|
export PAGER=$cmd
|
||||||
|
export BAT_PAGER="less $LESS"
|
||||||
|
|
||||||
if [[ -n $THEME_PREFER_LIGHT ]]; then
|
if [[ -n $THEME_PREFER_LIGHT ]]; then
|
||||||
export BAT_THEME="gruvbox-light"
|
export BAT_THEME="gruvbox-light"
|
||||||
else
|
else
|
||||||
export BAT_THEME="gruvbox-dark"
|
export BAT_THEME="gruvbox-dark"
|
||||||
fi
|
fi
|
||||||
export BAT_PAGER="less $LESS"
|
|
||||||
export PAGER=bat
|
|
||||||
|
|
||||||
## this breaks symlink testing with [ -h ], best not to activate it
|
## this breaks symlink testing with [ -h ], best not to activate it
|
||||||
# alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
|
# 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 '
|
alias -g -- --help='--help 2>&1 | bathelp '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user