Unfortunately I just overwrote my .bashrc
with
echo \"command\" > ~/.bashrc
as opposed to append
Sharing the link to an answer in another post which helped me. https://stackoverflow.com/a/40214165/13151296 If you only added a few touches to your bashrc, you can use this to get a fresh default bashrc and then add what you need using methods in previous answers of this thread.
Type the following in your terminal,
/bin/cp /etc/skel/.bashrc ~/
It will replace your corrupt ~/.bashrc with a fresh one. After that you need to source the ~/.bashrc so that the change take place immediately, write in terminal,
source ~/.bashrc
or if that does not work you can close the terminal and open it again.