Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Make bash’s tab-completion case-insensitive

Sometimes while accessing the various directories it happens most of the times that i remember the names or at least part of the names of a directory under our Linux system. But some of the directories are named starting with first character caps or one of the characters in the middle of the name Upper case.

Can anyone suggest how can i make the arguments following cd command case INSENSITIVE, such that if i perform cd BackupDirectory or cd backupdirectory it could enter the directory name BackupDirectory.

Ofcourse i don't want to screw the things for other users so if the above is possible, is that possible that the change could be applied just to the session i am using and do not effect other users?

OK, i tried bind "set completion-ignore-case on" but this just doesn't work. It just helps in the way if i type cd b and [tab] [tab] or [esc] [esc] it fills the directory name ignoring the case. But, what i need is if i do a cd backupdirectory, it just ignores the case and enters BackupDirectory on its own.

share|improve this question

migrated from Jan 3 '13 at 13:17

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Daniel Beck Jan 3 '13 at 13:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Probably not, because in the general case, you might have both BackupDirectory and backupdirectory. – Oliver Charlesworth Jan 3 '13 at 9:51
this answer solved this problem for me. – hoosierEE Mar 27 '14 at 0:06

Add this line to ~/.inputrc:

set completion-ignore-case on

Edit: sorry I just realized this doesn't re-lookup the previous word. To do that, you could make a custom "cd" completion in bash_complete.

share|improve this answer