Fix bat error 2

This commit is contained in:
JeremyStar™ 2023-12-16 23:54:03 +01:00
parent e7cc466b46
commit b3accadbeb

View file

@ -225,11 +225,11 @@ fi
if [ "${JSTMBASH_FANCIER_BAT}" == "true" ] && which bat &> /dev/null; then if [ "${JSTMBASH_FANCIER_BAT}" == "true" ] && which bat &> /dev/null; then
## check if moar should be bat's pager ## check if moar should be bat's pager
if [ "${JSTMBASH_FANCIER_BAT_USE_MOAR}" == "true" ] && which moar &> /dev/null; then if [ "${JSTMBASH_FANCIER_BAT_USE_MOAR}" == "true" ] && which moar &> /dev/null; then
export "PAGER=--pager=\"moar -colors 16M --no-linenumbers --statusbar bold\"" export "env PAGER=moar -colors 16M --no-linenumbers --statusbar bold "
fi fi
BAT_ARGUMENTS="--decorations=always --color=always --theme=Dracula --italic-text=always --wrap=never --nonprintable-notation=caret --paging=auto --style full ${PAGER}" BAT_ARGUMENTS="--decorations=always --color=always --theme=Dracula --italic-text=always --wrap=never --nonprintable-notation=caret --paging=auto --style full"
# shellcheck disable=SC2139 # shellcheck disable=SC2139
alias "bat=env PAGER=moar $(which bat) ${BAT_ARGUMENTS}" alias "bat=${PAGER}$(which bat) ${BAT_ARGUMENTS}"
if [ "${JSTMBASH_ALIASES_USE_BAT}" == "true" ]; then if [ "${JSTMBASH_ALIASES_USE_BAT}" == "true" ]; then
# shellcheck disable=SC2139 # shellcheck disable=SC2139
alias "cat=$(which bat) ${BAT_ARGUMENTS}" alias "cat=$(which bat) ${BAT_ARGUMENTS}"