8

Bash provides the interactive commands forward-search-history and reverse-search-history typically bound to the keys CTRL-s and CTRL-r respectively.

Are there case-insentive equivalents or is there a configuration to have these commands case-insensitive?

bind -P | grep -iE 'search|case' did not turn out anything relevant.

3
  • 1
    I use fzf as replacement for ctrl+r history search and can recommend. Commented Jan 17, 2022 at 8:09
  • 1
    None, see stackoverflow.com/questions/20523393/… Commented Jan 17, 2022 at 12:22
  • Switch to zsh. Its history search is case-insensitive by default, and its interactive features are much more configurable for when you don't like the defaults. Commented Aug 3, 2024 at 19:42

1 Answer 1

1

You can create a file named .inputrc in your home directory, and place this line in it:

set completion-ignore-case on

for zsh i use this

setopt NO_CASE_GLOB
setopt NO_CASE_MATCH
1
  • 1
    completion-ignore-case on doesn't work for history search, only completion. see stackoverflow.com/a/20536411 Commented Feb 19 at 17:02

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.