From bf55ef2a1ac2b192a502943929f720b06548c052 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun, 21 Apr 2024 14:32:58 -0700 Subject: [PATCH] Update .config/fish/conf.d/30-bat.fish --- dot_config/fish/conf.d/30-bat.fish | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dot_config/fish/conf.d/30-bat.fish b/dot_config/fish/conf.d/30-bat.fish index 85ad1d4..f466f75 100644 --- a/dot_config/fish/conf.d/30-bat.fish +++ b/dot_config/fish/conf.d/30-bat.fish @@ -1,14 +1,19 @@ #!/usr/bin/env fish set -gx BATDIFF_USE_DELTA true + set -g batcmd +if command -v bat &>/dev/null + set batcmd bat +else if command -v batcat &>/dev/null + set batcmd batcat +end + function cat --wraps bat if command -v bat &>/dev/null - set -g batcmd bat bat $argv else if command -v batcat &>/dev/null - set -g batcmd batcat batcat $argv end end