shopt: change additional shell optional behavior
There is a command called shopt that allows you to change additional shell optional behavior.
I use both Ubuntu and Manjaro and I noticed that sometimes bash behaved differently on Manjaro. For instance, I had a folder called “Test_me”. Once accidentally I wrote “cd test_me” and Manjaro entered the folder “Test_me” (notice the capital ‘T’) without any problem. Under Ubuntu it was impossible :)
As it turned out, the different behaviour is due to different shopt settings. In the example above, “cdspell” was on in Manjaro, while in Ubuntu it was off by default.
Since I use both systems and I want bash to behave similarly, I added these lines to the end of my ~/.bashrc:
# shopt settings (normalize Ubuntu and Manjaro) shopt -s cdspell shopt -s dotglob shopt -s hostcomplete shopt -s nocaseglob shopt -u sourcepath
I switched “sourcepath” off. Read this post if you want to know why.