The read
builtin command has -e
option
-e Use Readline to handle input. This permits input editing in the same
manner as the command line.
What's Readline
in the specification:
$ man readline
No manual entry for readline
$ man Readline
No manual entry for Readline
There are no details of readline.
See
man bash
, which has an entire section on Readline:GNU Readline is a library that's developed alongside bash, but is used by a number of other programs to provide better interactive command-line usage (for example, Python's REPL loop). It can be configured using
~/.inputrc
or/etc/inputrc
. See the readline site for more details.To jump directly to the READLINE section of the bash man page, I define the following alias in my
$HOME/.bash_aliases
file.Use
man 3 readline
for man page for Readline.Use
info rluserman
for the complete manual, with interactive links.Hit
H
and the bottom half of the screen will display a list of commands you can use to find what you need. Such as[
and]
to go through the nodes inrluserman
. Or try to find something specific by starting a search, for example:Suppose you were looking for the
vi-editing-mode
;/
to start a searchvi
, and confirm by hittingEnter
{
and}
to go back and forth through the occurrences in the manual.(PS.
vi\W'
, would be better because this would rule out hits like 'provided')