fix(zshrc): add check for batcat instead of bat before setting cat alias

chore(zshrc): improve error message when bat is not installed
This commit is contained in:
David Ibia
2025-01-19 18:09:07 +01:00
parent 6f37ad30a8
commit 8b5d620b3d

5
.zshrc
View File

@@ -141,8 +141,13 @@ fi
if [ -x "$(command -v bat)" ]; then
alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo ansi || echo base16)"
else
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
alias vim='nvim'