diff --git a/profile b/profile index 96151dd..8cb6118 100755 --- a/profile +++ b/profile @@ -40,9 +40,11 @@ export TERMCAP="${TERMCAP}:vb=" export PAGER="less" export LESS="-iMRX" -if which bat >/dev/null + +__batcommand=$(command -v bat || command -v batcat) +if test -n "$__batcommand" then - export LESSOPEN="| bat --color=always %s" + export LESSOPEN="| $__batcommand --color=always %s" # export LESSOPEN="| bat --color=always --decorations=never %s" fi