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 00:30:32
Message-Id: 20170919003022.GA4826@anonymous
In Reply to: [gentoo-user] Change Readline mode for all users? by Stroller
1 On 17-09-19 at 01:11, Stroller wrote:
2 > I prefer vi-style editing for my bash prompt - that is to say I press
3 > the escape key, and "b" two or three times and the cursor moves back 2
4 > or 3 words. I can press "escape" followed by shift-I to take the
5 > cursor back to the very start of the line, and "v" allows me to edit
6 > the command line in vi itself.
7 >
8 > I enable this in my .bashrc with "set -o vi".
9 >
10 > I find I can set it for all Readline-based programs by putting "set
11 > editing-mode vi" in ~/.inputrc.
12 >
13 > Is it possible to set this for all users, please, so that this edit
14 > mode is used for root?
15 Readline is customized by putting commands in an initialization file
16 (the inputrc file). The name of this file is taken from the value of the
17 INPUTRC environment variable. If that variable is unset, the default is
18 ~/.inputrc. If that file does not exist or cannot be read, the ultimate
19 default is /etc/inputrc.
20
21 > I find that my pager and editor are set in /etc/env.d/99pager and
22 > /etc/env.d/99editor respectively, but creating a
23 > /etc/env.d/99bashlineediting file containing "set -o vi" doesn't seem
24 > to work.
25 Either "set-editing-mode vi" in /etc/inputrc for all readline programs
26 or in /etc/bash/bashrc (for bash-only)
27
28 --
29 Simon Thelen

Replies

Subject Author
Re: [gentoo-user] Change Readline mode for all users? Stroller <stroller@××××××××××××××××××.uk>
Re: [gentoo-user] Change Readline mode for all users? Stroller <stroller@××××××××××××××××××.uk>