Questions tagged [readline]

The Gnu readline library is used by other programs, such as shells and interpreters, to provide common line-editing capabilities.

95 questions
132
votes
6 answers

How do I reload .inputrc?

Background I have heard that the readline module is reading ~/.inputrc and that is how it changes the behaviour of keystrokes under programs such as bash. Question How can I reload this after editing to see the changed behaviour without restarting…
Captain Lepton
  • 1,900
  • 3
  • 15
  • 11
47
votes
6 answers

Bash vs. Gnu screen : Replace Ctrl-A with Ctrl-Shift-A

I'm a new user to GNU Screen. I've been using Bash for a very long time, and I want to give GNU Screen a try. As you know, GNU Screen uses 'C-a' (Control-A) as as the command character. Trouble is, this interferes with the Line Editing feature in…
Stefan Lasiewski
  • 3,140
  • 6
  • 28
  • 33
33
votes
1 answer

How do I reload .inputrc using a bash script?

This question explains how to reload .inputrc using C-x C-r. But how would one reload it using commands in a bash script?
FMc
  • 493
  • 1
  • 5
  • 9
27
votes
3 answers

Bash readline deleting till the previous slash

In Bash Emacs mode, is there any way to delete till the previous slash character? For example, if I entered the command cp /usr/local/bin/reallylongincorrectfolder /home/myname/reallylong_and_correct_path and want to just delete the…
woodstok
  • 931
  • 1
  • 11
  • 23
25
votes
3 answers

Binding backward-kill-word to Ctrl+w

I'm trying to switch from prolonged use of Tcsh to recent exploration of Bash. I've managed to port over all my favorite features, except for Ctrl+w which treats spaces and slashes as word boundaries, most likely backward-kill-word. In Bash however…
Stefan M
  • 285
  • 3
  • 7
24
votes
4 answers

SQLite with readline support on Ubuntu

I had the sqlite3 package installed on Ubuntu and there's no support for readline. That means there's no command history and those other nifty features readline gives you. Is this a configuration or a packaging problem? Is there a different package…
agentofuser
  • 7,247
  • 11
  • 38
  • 34
17
votes
2 answers

Ctrl-e and Ctrl-a not working on Ubuntu Hardy?

I use a Mac, so I don't have Home and End keys on my keyboard. I also SSH to Linux servers quite a bit. I've found that when I SSH to an Ubuntu Linux server running Jaunty I can use the readline key-bindings Ctrl-a and Ctrl-e to move the cursor to…
Richard Turner
  • 477
  • 1
  • 4
  • 13
16
votes
2 answers

Is there a way of using ctrl-r after typing part of command in bash?

In bash the Ctrl+r command is very useful, I type Ctrl+r whatever and it searchs my history for commands containing the word whatever. But if I type whatever and realize that I would like search that word and hit Ctrl+r nothing happens. Is there a…
skeept
  • 295
  • 2
  • 7
16
votes
5 answers

Mac readline - Library not loaded

I'm working on a Mac, Sierra 10.12.3, and I'm trying to access a PostgreSQL database via the psql command, but it threw the error dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib Referenced from: /usr/local/bin/psql Reason:…
skwidbreth
  • 381
  • 2
  • 10
15
votes
4 answers

I'm using Bash in "vi mode". What's the hotkey sequence to edit the current command line using an external editor?

In Bash's "Emacs mode" (set -o emacs), I can edit the current command line in my favorite external $EDITOR. All I have to do is press Ctrl+X then Ctrl+E. But, because I have switched to Bash's "vi mode" (set -o vi), this key sequence doesn't do…
Alby
  • 487
  • 1
  • 6
  • 13
15
votes
2 answers

Terminal tab completion

Possible Duplicate: Bash completion for commands in Mac OS I'm just moved from linux to mac, and one of the problems I'm having is that tab completion is only 1 level deep, and I'm not sure how to correct that. Let me explain by example - when I…
sa125
  • 986
  • 2
  • 15
  • 22
14
votes
1 answer

Why do `bind` and `.inputrc` behave differently?

I'm trying to do the right thing and put my key bindings into ~/.inputrc. However, it turns out that I have to change bind '"\e\C-j":"\e[1~quiet \e[4~\n"' into "\e\C-j": "\eOHquiet \eOF\n" Now \eOH (nav-block-pos1 bound to beginning-of-line) and…
user173944
14
votes
2 answers

Mac Terminal/iTerm history cursor problems

So often, I run a command in either Terminal.app or iTerm, press the up arrow to go back to edit it, and the cursor jumps to the line above or somewhere totally in the wrong place. It especially happens when the command is so long that it wraps…
carillonator
  • 307
  • 1
  • 4
  • 8
13
votes
3 answers

PowerShell: history enhancements (readline)?

Some of the things I like in Bash and would love to know how to do in PowerShell: In Bash, I have history scrolling set up so that it only scrolls commands that begin with the same prefix as the current line. If I want to see my latest commit (e.g.…
IttayD
  • 924
  • 2
  • 12
  • 31
12
votes
1 answer

Strange keyboard when using sqlite shell on linux

I use a linux box connected trough putty. Using it with bash, my keyboard performs well, but when I am using the sqlite shell (sqlite3 program) my keys get crazy: del=^[[3~ up=^[[A left=^[[D right=^[[C down=^[[B here is my env (the relevant…
kurast
  • 399
  • 3
  • 14
1
2 3 4 5 6 7