Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

First, let me go through a specific case and then explain the general case.


Suppose I have two directories A and B.

The contents of A are:

foo
Bar

The contents of B are

foobar
Foobar

I would like tab completion of 'f' or 'F' in A to expand to 'foo'. Likewise 'b' or 'B' to go to 'Bar'.

However in B I want completion of 'f' to only expand to 'foobar' and 'F' to only expand to 'Foobar'.


More generally, tab completion should be case insensitive iff the letter that is being completed on has exactly one case when matched.

Note that there is set completion-ignore-case on I can put into my '.inputrc' file, but this does not work as I want in the case of my hypothetical directory B.

share|improve this question
add comment

1 Answer

I may be wrong, but I don't think this can be done simply, as bash is just not built for that to happen, you can change it for just your login or for all users, but not for each directory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.