Saturday, 25 October 2008

Auto-Correct Spelling Mistakes In Bash Shell

I am very poor at both typing and spelling, and often make silly little mistakes when typing. The following tweak will help you a lot if you have the same problems. To open and edit the .bashrc you can use any text editor like kate, gedit, vim, nano etc.

At the bottom of your .bashrc file, add the following:
shopt -s cdspell

This will ignore any simple mistakes such as typing cd /otp instead of cd /opt, or cd /ect instead of cd /etc.

Simple, but very effective!

No comments:

Post a Comment