From 24fc7dd2edb13e737b9e31cafa35a80d964c0e07 Mon Sep 17 00:00:00 2001 From: brethil Date: Mon, 11 Sep 2023 15:47:22 +0200 Subject: [PATCH] zsh: add `bathelp` alias for highlighting commands' -h/--help flags --- brethil_dotfile.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index f88dc55..4c4c8f5 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -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