Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

bash

readline

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?

like image 230
Martin C. Martin Avatar asked Dec 11 '13 15:12

Martin C. Martin


People also ask

How do you make a bash completion case insensitive?

It can be enabled for all future bash sessions by putting set completion-ignore-case on into the users's ~/. inputrc file, or the system /etc/inputrc , to enable it for all users.

Is bash command case sensitive?

Variables in Bash Scripts are untyped and declared on definition. Bash also supports some basic type declaration using the declare option, and bash variables are case sensitive.

Can I make tab completion case insensitive?

However, there is a way to make tab completion case insensitive. Tab completion makes it quicker and easier to enter directories names on the command line. You can simply start typing the beginning of the directory name at the prompt and then press Tab to have the rest of the directory name automatically entered.


1 Answers

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.

like image 187
anubhava Avatar answered Oct 11 '22 19:10

anubhava