Fix bat styling (finally!)
This commit is contained in:
parent
824d235e2e
commit
3470b6c039
1 changed files with 7 additions and 4 deletions
11
init.source
11
init.source
|
@ -225,18 +225,21 @@ fi
|
||||||
if [ "${JSTMBASH_FANCIER_BAT}" == "true" ] && which bat &> /dev/null; then
|
if [ "${JSTMBASH_FANCIER_BAT}" == "true" ] && which bat &> /dev/null; then
|
||||||
## check if we should use a pager (moar ofc)
|
## check if we should use a pager (moar ofc)
|
||||||
if [ "${JSTMBASH_FANCIER_BAT_USE_PAGER}" == "true" ] && which moar &> /dev/null; then
|
if [ "${JSTMBASH_FANCIER_BAT_USE_PAGER}" == "true" ] && which moar &> /dev/null; then
|
||||||
export "env PAGER=moar --no-linenumbers -colors 16M --statusbar bold "
|
export "PAGER=moar --no-linenumbers -colors 16M --statusbar bold"
|
||||||
|
export "PAGING=--paging=auto"
|
||||||
else
|
else
|
||||||
export "env PAGER= "
|
export "PAGER="
|
||||||
|
export "PAGING=--paging=never"
|
||||||
fi
|
fi
|
||||||
BAT_ARGUMENTS="--decorations=always --color=always --theme=Dracula --italic-text=always --wrap=never --nonprintable-notation=caret --paging=auto --style full"
|
BAT_ARGUMENTS="--decorations=always --color=always --theme=Dracula --italic-text=always --wrap=never --nonprintable-notation=caret ${PAGING} --style full"
|
||||||
# shellcheck disable=SC2139
|
# shellcheck disable=SC2139
|
||||||
alias "bat=${PAGER}$(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}"
|
||||||
fi
|
fi
|
||||||
unset PAGER
|
unset PAGER
|
||||||
|
unset PAGING
|
||||||
unset BAT_ARGUMENTS
|
unset BAT_ARGUMENTS
|
||||||
fi
|
fi
|
||||||
## makes moar fancier
|
## makes moar fancier
|
||||||
|
|
Reference in a new issue