whereswalden
whereswalden

Reputation: 4979

"set completion-ignore-case on " ignored in ~/.inputrc

I'm attempting to set completion-ignore-case on in my ~/.inputrc, but the option seems to be ignored. When I hit tab, only case-sensitive matches are shown.

Here's my ~/.inputrc:

# Bash input configuration
set completion-ignore-case on     #Enable case-insensitive tab-complete
"\e[A": history-search-backward   #Press up or down arrow to search through shell history on what you've already typed
"\e[B": history-search-forward

#"\e[1;9C": forward-word          #alt-left/right to move the cursor by words
#"\e[1;9D": backward-word         #I prefer to enable this in iTerm settings so it works no matter where I'm ssh'd to.

Oddly enough, the history-search-backward and -forward settings do work, so ~/.inputrc is getting read, but completion-ignore-case is getting ignored somehow.

Running bind "set completion-ignore-case on" yields the expected behavior. I also tried set-ing other variables in ~/.inputrc and they also worked fine.

I'm running MacOS 10.12.4 and bash 4.4.12(1)-release (installed via homebrew).

Upvotes: 5

Views: 4771

Answers (1)

saxitoxin
saxitoxin

Reputation: 568

Try to remove the comment. This seems to make it work for me.

# Bash input configuration
set completion-ignore-case on
"\e[A": history-search-backward   #Press up or down arrow to search through shell history on what you've already typed
"\e[B": history-search-forward

#"\e[1;9C": forward-word          #alt-left/right to move the cursor by words
#"\e[1;9D": backward-word         #I prefer to enable this in iTerm settings so it works no matter where I'm ssh'd to.

Upvotes: 8

Related Questions