Previous post:

Next post:

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.

# cd m

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.

# cd M

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.

# 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.

# cd m

March  	may 	Music 	myticket
Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Previous post:

Next post:

Leave a Comment

Previous post:

Next post: