zsh: add `bathelp` alias for highlighting commands' -h/--help flags

fix-ci
brethil 2023-09-11 15:47:22 +02:00
parent d1135262de
commit 24fc7dd2ed
1 changed files with 5 additions and 0 deletions

View File

@ -84,6 +84,11 @@ if [[ "$(command -v bat)" || "$(command -v batcat)" ]]; then
export BAT_THEME="gruvbox-dark"
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 -g -- --help='--help 2>&1 | bathelp '
fi
if [[ $SSH_CLIENT ]]; then