1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 19:11:30 +01:00

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

This commit is contained in:
brethil 2023-09-11 15:47:22 +02:00
parent d1135262de
commit 24fc7dd2ed

View File

@ -84,6 +84,11 @@ if [[ "$(command -v bat)" || "$(command -v batcat)" ]]; then
export BAT_THEME="gruvbox-dark" export BAT_THEME="gruvbox-dark"
export BAT_PAGER="less $LESS" export BAT_PAGER="less $LESS"
export PAGER=bat 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 fi
if [[ $SSH_CLIENT ]]; then if [[ $SSH_CLIENT ]]; then