From 18f7c1e64fb3c2259c23a35e11a7fa547fdef970 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 20 Nov 2023 07:10:24 -0500 Subject: [PATCH] remove batcat on fedora due to unavailablity --- .bashrc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 4cbfc78..f2ee8d4 100644 --- a/.bashrc +++ b/.bashrc @@ -56,7 +56,17 @@ alias spico='sedit' alias nano='edit' alias snano='sedit' alias vim='nvim' -alias cat='batcat' + +# Replace batcat with cat on Fedora as batcat is not available as a RPM in any form +if command -v lsb_release > /dev/null; then + DISTRIBUTION=$(lsb_release -si) + + if [ "$DISTRIBUTION" = "Fedora" ]; then + alias cat='bat' + else + alias cat='batcat' + fi +fi # To have colors for ls and all grep commands such as grep, egrep and zgrep export CLICOLOR=1