Technix
Technology Weblog

Enabling spell checking for bash


shopt is a built-in command that controls shell behavior. In order to customize our shell environment we add the shopt commands to our .bashrc file.

shopt -s cdspell

This will correct the typing mistakes for cd command. eg: We need to go to directory testing/default. But by mistake type

# cd tesring/default
testing/default

Since we have set cdspell this typing error will be corrected and we will be directed to the correct directory.

About these ads

No Responses to “Enabling spell checking for bash”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: