Gentoo Archives: gentoo-user

From: Simon Thelen <gentoo-user@××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Change Readline mode for all users?
Date: Tue, 19 Sep 2017 13:54:32
Message-Id: 20170919135421.GA4604@anonymous
In Reply to: Re: [gentoo-user] Change Readline mode for all users? by Stroller
1 On 17-09-19 at 14:48, Stroller wrote:
2 > > On 19 Sep 2017, at 01:30, Simon Thelen <gentoo-user@××××.de> wrote:
3 > >> Is it possible to set this for all users, please, so that this edit
4 > >> mode is used for root?
5 > > Readline is customized by putting commands in an initialization file
6 > > (the inputrc file). The name of this file is taken from the value of the
7 > > INPUTRC environment variable. If that variable is unset, the default is
8 > > ~/.inputrc. If that file does not exist or cannot be read, the ultimate
9 > > default is /etc/inputrc.
10 > >
11 > >> I find that my pager and editor are set in /etc/env.d/99pager and
12 > >> /etc/env.d/99editor respectively, but creating a
13 > >> /etc/env.d/99bashlineediting file containing "set -o vi" doesn't seem
14 > >> to work.
15 > > Either "set-editing-mode vi" in /etc/inputrc for all readline programs
16 > > or in /etc/bash/bashrc (for bash-only)
17 > I looked at /etc/inputrc, and its existing contents are of a different format.
18 >
19 > Where all the other lines are of the form:
20 > "\eOH": beginning-of-line
21 > "\eOF": end-of-line
22 > it felt a bit wrong to be adding "set-editing-mode vi". Hence me asking here. Is it foolish of me to think this?
23 That's just part of the inputrc, mine at least also has several settings
24 set at the top of the file. According to readline(3) the inputrc can
25 contain both key bindings and variable settings, the lines you pointed
26 out are the keybindings and what you wanted to add is a variable setting
27 (set editing-mode vi).
28
29 --
30 Simon Thelen