From 8b5d620b3d9e3a585418b559b07d7d3aff106c06 Mon Sep 17 00:00:00 2001 From: David Ibia Date: Sun, 19 Jan 2025 18:09:07 +0100 Subject: [PATCH] fix(zshrc): add check for batcat instead of bat before setting cat alias chore(zshrc): improve error message when bat is not installed --- .zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 63f79d1..519b19b 100644 --- a/.zshrc +++ b/.zshrc @@ -141,7 +141,12 @@ fi if [ -x "$(command -v bat)" ]; then alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo ansi || echo base16)" else - echo "bat is not installed. Please install it to use the custom cat command." + + if [-x "$(command -v batcat)"]; then + alias cat="batcat" + else + echo "bat is not installed. Please install it to use the custom cat command." + fi fi # alias vim to neovim