Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 7460 - /etc/profile ignores user's .inputrc
/etc/profile ignores user's .inputrc
Product: Red Hat Linux
Classification: Retired
Component: setup (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 1999-11-30 19:39 EST by Christian Hechelmann
Modified: 2014-03-16 22:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-01-13 11:15:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christian Hechelmann 1999-11-30 19:39:12 EST
/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
:   INPUTRC=/etc/inputrc
:   export INPUTRC
: fi

The corresponding code for *csh like shells is left as an exercise for the
reader :-)
Comment 1 James Ralston 2000-01-12 19:52:59 EST
I was just about to report this same bug.

The patch that drdisk@tc-gruppe.de 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
this line:

    $include /etc/inputrc

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 drdisk@tc-gruppe.de 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.
Comment 2 James Ralston 2000-01-13 04:22:59 EST
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.
Comment 3 Bill Nottingham 2000-01-13 11:15:59 EST
Fixed in setup-2.0.9, etcskel-2.1, both of which should
be in the next Raw Hide release.

Note You need to log in before you can comment on or make changes to this bug.