4

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).

whereswalden
  • 4,819
  • 3
  • 27
  • 41

1 Answers1

8

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.
saxitoxin
  • 418
  • 3
  • 6
  • *facepalm* I can't believe that was the problem. Turns out you can't have comments on the same line as commands in inputrc. – whereswalden Apr 13 '17 at 02:23