Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Change Readline mode for all users?
Date: Tue, 19 Sep 2017 00:11:40
Message-Id: F48BABC3-C0F9-4BD2-A030-0B77D92A01A9@stellar.eclipse.co.uk
1 I prefer vi-style editing for my bash prompt - that is to say I press the escape key, and "b" two or three times and the cursor moves back 2 or 3 words. I can press "escape" followed by shift-I to take the cursor back to the very start of the line, and "v" allows me to edit the command line in vi itself.
2
3 I enable this in my .bashrc with "set -o vi".
4
5 I find I can set it for all Readline-based programs by putting "set editing-mode vi" in ~/.inputrc.
6
7 Is it possible to set this for all users, please, so that this edit mode is used for root?
8
9 I find that my pager and editor are set in /etc/env.d/99pager and /etc/env.d/99editor respectively, but creating a /etc/env.d/99bashlineediting file containing "set -o vi" doesn't seem to work.
10
11 Any thoughts, please?
12
13 Stroller.

Replies

Subject Author
Re: [gentoo-user] Change Readline mode for all users? "Vadim A. Misbakh-Soloviov" <gentoo@×××.name>
Re: [gentoo-user] Change Readline mode for all users? Simon Thelen <gentoo-user@××××.de>