<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 29/06/2020 21:32, Chris Green wrote:<br>
</div>
<blockquote type="cite" cite="mid:20200629113216.GA12259@esprimo">
<pre class="moz-quote-pre" wrap="">I have been trying to configure my key bindings using readline/inputrc
and it seems to me that bash isn't reading /etc/inputrc or ~/.inputrc
automatically.
Other programs that use readline *do* see my customised /etc/inputrc
or ~/.inputrc, either seems to work. However bash stubbornly ignores
the settings in either of these files. The default bashrc set-up sets
INPUTRC=/etc/inputrc and I still have that setting but it doesn't seem
to help at all.
I can obviously simply add a "bind -f /etc/inputrc" to my .profile but
it shouldn't really be necessary.
It also appears that bash has its own, compiled in, defaults for key
bindings, are these documented anywhere?
</pre>
</blockquote>
<p>As I recall bash has it own stuff for doing this like set -o vi
for vi key bindings <br>
from man bash:<br>
<br>
INPUTRC<br>
The filename for the readline startup file,
overriding the default of ~/.inputrc (see<br>
READLINE below).<br>
<br>
:<br>
:<br>
Readline Initialization<br>
Readline is customized by putting commands in an
initialization file (the inputrc file).<br>
The name of this file is taken from the value of the
INPUTRC variable. If that variable is<br>
unset, the default is ~/.inputrc. When a program which
uses the readline library starts up,<br>
the initialization file is read, and the key bindings and
variables are set. There are only<br>
a few basic constructs allowed in the readline
initialization file. Blank lines are ig‐<br>
nored. Lines beginning with a # are comments. Lines
beginning with a $ indicate condi‐<br>
tional constructs. Other lines denote key bindings and
variable settings.<br>
<br>
The default key-bindings may be changed with an inputrc
file. Other programs that use this<br>
library may add their own commands and bindings.<br>
<br>
For example, placing<br>
<br>
M-Control-u: universal-argument<br>
or<br>
C-Meta-u: universal-argument<br>
into the inputrc would make M-C-u execute the readline
command universal-argument.<br>
<br>
The following symbolic character names are recognized:
RUBOUT, DEL, ESC, LFD, NEWLINE, RET,<br>
RETURN, SPC, SPACE, and TAB.<br>
<br>
In addition to command names, readline allows keys to be
bound to a string that is inserted<br>
when the key is pressed (a macro).<br>
<br>
So you could unset INPUTRC it that way by default on my Ubuntu box<br>
</p>
<div class="moz-signature">-- <br>
<pre> .~. In my life God comes first....
/V\ but Linux is pretty high after that :-D
/( )\ Francis (Grizzly) Smit
^^-^^ <a class="moz-txt-link-freetext" href="http://www.smit.id.au/">http://www.smit.id.au/</a>
</pre>
</div>
</body>
</html>