Questions tagged [readline]

GNU Readline is a library that provides command-line editing and history searching capabilities for Bash and other interactive command-line programs. Use this tag for questions relating to the use of Readline functionality in Bash and other software.

should be used for questions pertaining to the configuration and use of GNU Readline in Bash and other command-line software as Python or MySQL (see , and ). Use for questions about Readline's configuration file and its syntax.

GNU Readline is a library for command line editing. The most prominent program that uses it is Bash, and Bash and Readline have the same maintainer. Many other programs with a command line interface use it, for example the Python toplevel. Readline's capabilities include basic editing facilities, command history, (internal) copy-paste and completion. Readline has different modes such as Emacs mode and vi mode which provides Emacs/vi-like bindings for line-editing.

Readline's configuration file is ~/.inputrc, see for questions and answers specific to its syntax.

The rlwrap utility provides Readline's capabilities to programs that just read from standard input.

Further reading

External links

284 questions
4
votes
2 answers

How to kill forward until the end of a big word or to next space character

I can not wrap my head finding a solution for this simple editing task in Readline. I just want to kill the characters forward until the end of a Big word, that is, (more or less) until the next space character (dE in vim). Specially, when hitting a…
Naitree
  • 889
4
votes
1 answer

Where to find a complete list of bindable readline-functions of Vi mode?

On searching for a way of jumping between whitespaces with GNU Readline library, I discovered the vi-fWord and vi-bWord readline-functions in this question. But strangely, I cannot find any trace of them in the Readline Manuals this and this. Where…
Naitree
  • 889
3
votes
1 answer

How to Set Readline key bindings in both vi-command and vi-insert modes

To use the Emacs transpose-words function in vi mode I have the following .inputrc: $if mode=vi bind Control-b: transpose-words $endif Unfortunately it only works in "insert" mode. What is the trick to make it work in both "insert" and "command"…
2
votes
0 answers

Redo in readline emacs editing mode

How to redo (or undo an undo) in readline Emacs editing mode? The ways I've found for Emacs (C-g _) do not seem to work from the command line.
Aurèle
  • 121
0
votes
1 answer

Customize the default word definition of GNU readline library?

GNU readline considers consecutive alphanums as word, and all others are non-words, like -option1 -option2 has 4 words (" -", "option1", " -", "option2") which makes it unintuitive when moving the cursor around. Is there a way to customize this word…
Thomson
  • 113
0
votes
4 answers

How to expand a variable on console/shell prompt

How do we expand a variable, ie. a '$' preceded name, to its value content on bash readline ?
user499557
0
votes
0 answers

In GNU readline, How to change Alt key to Meta, instead of being ESC?

In GNU readline manual, it says the left Alt is usually Meta: The Meta key is labeled ALT on many keyboards. On keyboards with two keys labeled ALT (usually to either side of the space bar), the ALT on the left side is generally set to work as a…
Naitree
  • 889
0
votes
1 answer

Rlwrap vi-movement-mode does not work with some programs

With rlwrap cat or rlwrap bash I can use keybinding "jk" to exit from insert mode. This does not work with rlwrap ghci. Why?
sevo
  • 1,237