7

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.

Zanna
  • 69,223
  • 56
  • 216
  • 327
AbstProcDo
  • 2,811
  • 6
  • 29
  • 56
  • 1
    [How can I get help on terminal commands?](https://askubuntu.com/q/991946/507051) – As `type read` reveals (and you already found out), `read` is a shell builtin. Those are documented in the shell's manual pages, so `man bash` is the correct source in your case. – dessert Apr 14 '18 at 06:52

4 Answers4

10

See man bash, which has an entire section on Readline:

READLINE
   This  is  the  library  that  handles  reading  input  when  using   an
   interactive  shell,  unless  the  --noediting  option is given at shell
   invocation.  Line editing is also used when using the -e option to  the
   read  builtin.

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.

muru
  • 193,181
  • 53
  • 473
  • 722
  • @SergiyKolodyazhnyy I think those are just for the API. The readline site's documentation is more comprehensive. – muru Apr 14 '18 at 06:53
  • yep, the site might be a bit more comprehensive, but just in case someone stumbles around here looking for readline manpages, it actually a thing that exists. Correction on my last comment, though, it's part of `readline-common` package, had to track it down via `.list` files. – Sergiy Kolodyazhnyy Apr 14 '18 at 07:00
2

To jump directly to the READLINE section of the bash man page, I define the following alias in my $HOME/.bash_aliases file.

alias man-readline="man -P 'less -p ^READLINE' bash"
trellem
  • 61
  • 5
1

Use man 3 readline for man page for Readline.

Eranda Peiris
  • 741
  • 7
  • 17
1

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 in rluserman. Or try to find something specific by starting a search, for example:

Suppose you were looking for the vi-editing-mode;

  1. hit / to start a search
  2. type your query, e.g. vi, and confirm by hitting Enter
  3. use { 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')

pm-b
  • 154
  • 1
  • 8