Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7460 - /etc/profile ignores user's .inputrc
Summary: /etc/profile ignores user's .inputrc
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: setup
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-12-01 00:39 UTC by Christian Hechelmann
Modified: 2014-03-17 02:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-01-13 16:15:51 UTC

Attachments (Terms of Use)

Description Christian Hechelmann 1999-12-01 00:39:12 UTC
/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-13 00:52:59 UTC
I was just about to report this same bug.

The patch that 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 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 09:22:59 UTC
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 16:15:59 UTC
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.