I was looking for a tweak to the cd command so that it recognizes spelling mistakes of directories and auto complete similar directory names.
Right now, I have settings that recognize the spelling mistakes of directory but does not auto complete them.
For directory spelling mistake correction I have this code in ~/.bashrc
:
shopt -s cdspell
Now it works in the following manner, suppose I have a directory called "trash"
vickey@home:~$ cd tras
trash
vickey@home:~/trash$ cd ..
vickey@home:~$ cd trasx
trash
vickey@home:~/trash$ pwd
/home/vickey/trash
vickey@home:~/trash$
vickey@home:~$ cd Trash
trash
vickey@home:~/trash$ pwd
/home/vickey/trash
But the problem I have is suppose I make a directory called Temp and do something like
vickey@home:~$ mkdir Temp
vickey@home:~$ cd temp
Temp
vickey@home:~/Temp$ cd ..
vickey@home:~$ cd te #and tab here
test/ textin/
it does not show Temp
as an option. Is there anyway to make auto completion case insensitive?