Martin C. Martin
Martin C. Martin

Reputation: 3682

In bash readline, how do I make the incremental search case insensitive

At the bash prompt, I can type Ctrl-r and Ctrl-s to perform incremental search of my command history.

However, the search is case sensitive: If I have a command cat SomeFile.txt, and I hit "Ctrl-r somefile", I get nothing.

Is there a way to make that search case-insensitive?

Upvotes: 27

Views: 2173

Answers (2)

anubhava
anubhava

Reputation: 785521

Short Answer: No you can't get this feature in BASH at present because this feature hasn't been built yet into vi or emacs mode. As I commented above completion-ignore-case only applies to completion, not to isearch.

Upvotes: 21

user2840647
user2840647

Reputation: 1314

see if you have a file called "inputrc" in either "~/.inputrc" or "/etc/inputrc" and add the line.

set completion-ignore-case on

Upvotes: -5

Related Questions