Hi, I’ve been using CachyOS on a VM for a little while now and really enjoy using the OS. I was recently going to add something to my .bashrc file, however I noticed that when I try to source .bashrc I get the following error:
.bashrc (line 11): “case” builtin not inside of switch block
I have not changed anything in the .bashrc file prior to this point so I’m not exactly sure why I am getting the error and if this is something with me or just the OS. I tried restoring .bashrc from the copy in /etc/skel just in case something did get changed, but the problem still persists. I’m thinking this is probably just me being stupid, but any help or suggestions that anyone could provide would be much appreciated. I have included the contents of my .bashrc file below, thank you.
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
esac
alias ls='ls --color=auto'
alias la='ls -a'
alias ll='ls -la'
alias l='ls'
alias l.="ls -A | egrep '^\.'"
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
PS1='[\u@\h \W]\$ '
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control. #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
shopt -s expand_aliases
# export QT_SELECT=4
# Enable history appending instead of overwriting. #139609
shopt -s histappend
#neofetch
. "$HOME/.cargo/env"```