diff --git a/.bashrc b/.bashrc index 30a67f5..d529521 100644 --- a/.bashrc +++ b/.bashrc @@ -71,17 +71,17 @@ alias snano='sedit' alias vim='nvim' # 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) -else - DISTRIBUTION=$(cat /etc/os-release | grep ^ID= | cut -d'=' -f2) -fi - -if [ "$DISTRIBUTION" = "Fedora" ] || [ "$DISTRIBUTION" = "Arch" ]; then - alias cat='bat' -else - alias cat='batcat' -fi +#if command -v lsb_release >/dev/null; then +# DISTRIBUTION=$(lsb_release -si) +#else +# DISTRIBUTION=$(cat /etc/os-release | grep ^ID= | cut -d'=' -f2) +#fi +# +#if [ "$DISTRIBUTION" = "Fedora" ] || [ "$DISTRIBUTION" = "Arch" ]; then +# alias cat='bat' +#else +# alias cat='batcat' +#fi # To have colors for ls and all grep commands such as grep, egrep and zgrep export CLICOLOR=1 @@ -429,6 +429,14 @@ distribution () { echo $dtype } + +DISTRIBUTION=$(distribution) +if [ "$DISTRIBUTION" = "redhat" ] || [ "$DISTRIBUTION" = "arch" ]; then + alias cat='bat' +else + alias cat='batcat' +fi + # Show the current version of the operating system ver() { local dtype @@ -637,4 +645,4 @@ fi export PATH=$PATH:"$HOME/.local/bin:$HOME/.cargo/bin:/var/lib/flatpak/exports/bin:/.local/share/flatpak/exports/bin" eval "$(starship init bash)" -eval "$(zoxide init bash)" \ No newline at end of file +eval "$(zoxide init bash)"