Red Hat Bugzilla – Bug 7460
/etc/profile ignores user's .inputrc
Last modified: 2014-03-16 22:11:27 EDT
/etc/profile always sets INPUTRC to /etc/inputrc, thus making it impossible
for a user to set its own .inputrc. I for example configure some gdb
keybindings in .inputrc among various other stuff.
The following code is IMHO better in any case.
: if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
: export INPUTRC
The corresponding code for *csh like shells is left as an exercise for the
I was just about to report this same bug.
The patch that email@example.com provided for /etc/profile to conditionally
set INPUTRC is a good idea, but a better solution to this problem would be to
have the readline package contribute an /etc/skel/.inputrc file that contains
For backwards compatibility with old accounts that weren't created with an
~/.inputrc file, the /etc/profile file could just use the conditional code to
set INPUTRC that firstname.lastname@example.org provided.
Note that if the readline package contributes /etc/skel/.inputrc, it might be a
good idea to make it part of the base (mandatory) RPM system. Currently, it
isn't; I can "rpm --test -e" it so long as I also remove all of the packages
that depend on it.
Optionally, you might be able to convince Chet Ramey to make /etc/inputrc a
default location for a system-wide inputrc file, and have libreadline cascade
them (first read /etc/inputrc, then read ~/.inputrc), the same way bash does for
the /etc/profile and ~/.bash_profile files. It seems like that level of
customization is what is really needed here, and no backwards-compatibility
checks would be required.
BTW, just to clarify, I noticed the issues with INPUTRC for a different reason:
the default /etc/inputrc that comes with Red Hat contains:
set convert-meta off
Under bash2, that setting makes it so that all the cool key bindings I'm used to
(M-f for forward-word, M-d for backward-kill-word, etc.) generate Latin-1
characters instead. That's useful in the international scheme of things, to be
sure, but that's definitely not the behavior I want; I want the "set
convert-meta on" behavior.
Fixed in setup-2.0.9, etcskel-2.1, both of which should
be in the next Raw Hide release.