Make cd command Arguments Case Insensitive

by Ramesh

As you already know, the following cd command example will display all the available directories that begin with lower-case m.

  1. # cd m
  2.  
  3. may myticket

Note: You have to press tab key twice after ‘m’

In the same way, the following cd command example will display all the available directories that begin with upper-case M.

  1. # cd M
  2.  
  3. March Music

Display both upper-case and lower-case

If you like to display both lower-case and upper-case directory names (Even when you give only lower-case), execute the following bind command.

  1. # bind "set completion-ignore-case on"

Now, if you press two tabs after the lower-case alphabets in the cd-command argument, it will automatically display both lower-case and upper-case directories as shown below.

  1. # cd m
  2.  
  3. March may Music myticket