0

I'm trying to improve my bash experience by adding the usual preferences to the inputrc file:

set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete

However, when I put them in my etc/.inputrc file and restart bash, they don't work. Is etc/ the proper place for the .inputrc file? I believe you need to create the file from scratch on a Mac. I couldn't find one so I made it myself. Is there another set command I need to copy/paste into my .inputrc file to make these other commands work?

Edit: I created a new .inputrc file in my home directory with the same commands and Bash accepted it. I thought this file needed to be in /etc. Would love an explanation if anyone has one.

1 Answer 1

2

I created a new .inputrc file in my home directory with the same commands and Bash accepted it. I thought this file needed to be in /etc. Would love an explanation if anyone has one.

Bash uses readline and man readline says:

INITIALIZATION FILE
Readline is customized by putting commands in an initialization file (the inputrc file). The name of this file is taken from the value of the INPUTRC environment variable. If that variable is unset, the default is ~/.inputrc. If that file does not exist or cannot be read, the ultimate default is /etc/inputrc. […]

So the relevant file is ~/.inputrc or /etc/inputrc. The file you tried (/etc/.inputrc) is never mentioned.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.