Questions tagged [readline]

These questions are about GNU Readline, 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 that provides line-editing and history capabilities for interactive programs with a command-line interface, such as Bash or Python. 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.

Further reading

External links

16 questions
46
votes
6 answers

How do I install GNU Readline?

Basically as per question. I have the .tar.gz file but I can't seem to install it. I did the whole, ./configure, make and make install but it didn't work.
Josh Pinto
  • 8,089
16
votes
1 answer

How do I do this "install: you may need to run ldconfig"

I need to install readline on a Linux server. Since I don't have sudo access, I tried this instruction but I got into a problem. I've installed readline by using ./configure, make, make install. In the end it asks me install: you may need to run…
Mehrshad
  • 282
  • 1
  • 2
  • 10
11
votes
2 answers

Can I configure bash/readline to automatically convert NBSP to normal space?

I'm using Finnish keyboard layout which maps AltGr+Space to non-breaking space (NBSP, U+00A0). I'm happy with this in general but I find that I often accidentally write NBSP instead of normal space after pipe "|" symbol (written with AltGr+< with…
6
votes
2 answers

Tab-completion of shell patterns

On my Debian servers I'm used to hitting Tab to "preview" the expansion of shell patterns: $ cp *some* something somewhat have-some-cake $ cp *some*_ When the pattern expands to one entry, Tab replaces the pattern with the actual entry;…
Tobia
  • 685
6
votes
2 answers

Where does /etc/inputrc come from?

I'm just being curious about how or from what package the /etc/inputrc file is generated in an Ubuntu system. I've tried: $ apt-file search /etc/inputrc But it outputs nothing. No package assigned? I've seen there exist a inputrc file in the…
3
votes
1 answer

Pressing "v" in the terminal opens bash-fc.some_random_string in the editor

Recently I've started using the vim keybinding in the terminal. I changed the keybinding of the terminal by adding the following line in the ~/.bashrc file. set -o vi But I've noticed an issue with it. When I go to the normal mode by pressing the…
h-sifat
  • 133
2
votes
0 answers

Using readline in python3 (input) pressing arrows will remove text from the input

My input code is: import readline readline.parse_and_bind('tab: complete') readline.parse_and_bind('set editing-mode vi') while True: c = input('INPUT> ') (It is a little piece of test code to test readline.) When i type abc ENTER Hello,…
1
vote
0 answers

Bash: readline+vim jumps into cmd mode in forward-history-search and upon pressing Delete

I am using the vim mode in my bash (i.e. I setup readline to use vim mode through ~/.inputrc). If I do a history-search-backward and then history-search-forward in insert mode with some characters already typed, the bash jumps to command mode when…
Bananach
  • 670
1
vote
2 answers

"readline" when there is output at beginning of line

I am using the (excellent) readline (version 6.3, default [non-vi] mode) library from within my own program, running in a Terminal window (on a PC). There is a problem when there is previous output not terminated by newline when readline() is…
JonBrave
  • 699
1
vote
2 answers

What is the best way to install Raku on Ubuntu 22.04 with readline or a line editor?

On Ubuntu 22.04 LTS, I can install Rakudo (formerly known as Perl 6) like this: sudo apt install rakudo Then when I run raku on the command-line, I get this output: $ raku Welcome to Rakudo™ v2022.02. Implementing the Raku® Programming Language…
Flimm
  • 44,031
1
vote
1 answer

How to enable up arrow in Rakudo REPL on Ubuntu 21.10?

I'm installed Rakudo on Ubuntu 21.10 by running this command: sudo apt install rakudo Now I can run the Raku REPL by running raku or rakudo. I would like to be able to select the previous command by typing the up arrow, just like you can in the…
Flimm
  • 44,031
1
vote
1 answer

readline: unknown key modifier

I am attempting to set revert-all-at-newline on in my bash config file. bind 'revert-all-at-newline on' However, this throws the error readline: revert-all-at-newline: unknown key modifier bind does not appear to have it $ bind -l | grep…
steel
  • 257
  • 2
  • 9
1
vote
1 answer

Problem with readline library in Ubuntu 18.04

When trying to run sudo apt install debsig-verify which is needed to install Slack I got this error message: You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libreadline-dev:i386…
0
votes
0 answers

How to put cursor between PS1 characters?

I'd like to put the insertion cursor of bash inside the PS1 variable: export PS1='\u@\h::\w' Where the colons are included in the prompt (typing enter should result in a string "::"). Is this possible?
user216320
0
votes
0 answers

Xubuntu broke after removing the readline-common package

First of all, I would like to apologize in advance for the little content I can bring to this problem. My problem is as follows: I'm running Xubuntu 22.04, and I unintentionally removed the readline-common package because I had a problem with GCC…
Pioupia
  • 109
1
2