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

learn more… | top users | synonyms

1
vote
1answer
38 views

Setting Vim key bindings for the MySQL client

I add these following lines to ~/.inputrc and now the Postgres client, psql, uses Vim keybindings. set keymap vi set editing-mode vi However, this does not work for MySQL. I understand that MySQL ...
2
votes
1answer
55 views

How to change BASH “editing-mode vi” shortcuts?

I'm trying to change my bash vi mode keys to enter and exit insert mode, I would like to set these shortcuts: Ctrl-\ : Enter moviment mode Alt-\ : Enter insert mode how can I do that? I'm trying ...
0
votes
2answers
34 views

how to disable `alt-numkey` in bash shell

I can bounce between apps in Chrome OS by pressing alt-N, where N is the position of my app on the status bar. Useful! But when I'm in the bash shell of my Nitrous.io box, pressing alt-N to bounce to ...
0
votes
1answer
71 views

Meta keybindings for bash readline from .inputrc not working

If I put "\M-p": previous-history into my .inputrc and fire up a terminal (urxvt or xterm), hitting Alt-p prints a ":" character. Subsequent hits produce ^[p like so: :^[p^[p^[p^[p^[p I would ...
2
votes
2answers
76 views

How do you get to editor in vi mode in bash

In emacs mode in bash (set -o emacs), I can get to the editor by typing ctrl + X, ctrl + E. But I have set -o vi on, which is vi mode, and this key sequence doesn't seem to trigger the editor in vi ...
0
votes
1answer
49 views

What does “vi-move” keymap in Bash's vi mode actually do?

The keymap section in the Bash Reference Manual says that one of the acceptable options is "vi-move". There doesn't seem to be any description for what this corresponds to. I'm well acquainted with ...
2
votes
1answer
71 views

Use a separate history for 'read -e' (readline)

I would like to write an interactive command shell in shell script, for easier adjusting of the iptables firewall. The problem is, that read -e uses the shell history. Is there a way of using a ...
1
vote
1answer
325 views

Keystrokes and commands for my inputrc — key-combination for “Shift-Space”, remap “Ctrl-PageUp/PageDown” to something without Page-keys

I need to add some things to my inputrc. I'm using bash 4, as OS I'm using debian and OSX. My terminal emulators are rxvt-unicode-256 on debian and Terminal.app on OSX. My new macbook has no ...
2
votes
1answer
119 views

Common keyboard shortcuts for zsh zle and bash readline

I use zsh as my shell, but there are a lot of commandline programs which use readline. I also like to configure different keyboard shortcuts (e.g. ctrl backspace and ctrl delete). Is there a way to ...
0
votes
0answers
114 views

Cursor keys leave insert mode in irb in vi mode

I am using vi-mode in a ruby IRB by having a ~/.inputrc containing only the following line: set editing-mode vi Since I changed from ruby 1.8.7-p371 to ruby 1.9.3 and 2.0.0, IRB (and the rails ...
1
vote
0answers
140 views

.inputrc, TAB and CTRL-i

Apparently, when we hit TAB in Terminal, CTRL+i is send instead, so we cannot have different bindings for these keypresses in our .inputrc: "\C-i": forward-char TAB: complete This makes TAB move ...
4
votes
1answer
350 views

readline / bash: How to map Escape key and Arrow keys?

From another piece of command-line driven software, I'm used to the following behavior: Arrow up / down go through the command history, matching lines that match the characters typed so far on the ...
0
votes
2answers
353 views

How can I iterate through possible completions in gnu readline?

In a shell that implements GNU Readline, I can click the key to get a list of possible completions to what I started typing. For example: C:\>cd P<TAB> PerfLogs\ Program Files ...
1
vote
1answer
163 views

readline reverse-search-history C-r repeatedly finds next cmd, how to go back to previous?

This is probably a very simple question, but I would really like to find out if this is possible. If I start a reverse history search with C-r and then press C-r again multiple times I can search for ...
2
votes
1answer
493 views

Bash readline deleting till the previous slash

In bash emacs mode, is there anyway to delete till the previous slash character? For example if i entered the command cp /usr/local/bin/reallylongincorrectfolder ...
1
vote
1answer
118 views

Bash readline move cursor to previous forward slash

In bash , we can move back or forward by 1 word or character. Is there any option where i can move the cursor to the previous character that i specify, for example Forward Slash. ? Something like the ...
3
votes
1answer
450 views

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 ...
1
vote
1answer
159 views

How to disable the key 'V' in VI Editing Mode against bash

As we know, after changed the Readline mode to vi by command set -o vi and set editing-mod vi, press the key v can into an temp file to edit command (here more details). I want to disable that ...
2
votes
1answer
296 views

bash/readline for “move forward by whitespace-delimited word?”

In bash/readline, if you want to navigate through a command, often you have things like: cat /home/foo/bar.txt /home/bar/baz.txt If my cursor is at the end of the line (^e), and I want to move back ...
4
votes
1answer
277 views

Way to move cursor by arguments in bash?

In bash, you can use M-f and M-b to move the cursor one word forward and backwards, but is there a way to move one argument forward or backwards? If not out of the box, perhaps by some configuration? ...
1
vote
1answer
184 views

Switching between readline editing-modes in GNU octave

When punching away at the keyboard on the octave command line, I sometimes find that the various readline shortcuts stop working, e.g. C-a and C-e just insert ^A and ^E. It took me a while to realize ...
13
votes
1answer
542 views

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 ...
0
votes
1answer
330 views

Bash default command line editing mode

What is the default command line editing mode for bash? I have been playing around with the command line editing modes in bash.The problem is that i have added lines in bashrc to toggle the vi and ...
1
vote
1answer
857 views

How to bind up arrow in ~/.inputrc (readline) for vim insert mode?

When in Readline apps with vim mode enabled in ~/.inputrc (set editing-mode vi) is there a way to bind the <Up> arrow key in vi-insert mode? To display previous history item, for example. It ...
6
votes
2answers
323 views

Is it possible to control the whole Gnome desktop with vi-like commands?

I know with readline you can use emacs or vi commands to edit the input of several interactive text programs. I wonder if there exists such a similar facility to control the whole desktop in Gnome or ...
1
vote
0answers
42 views

Making M-u, M-l, and M-c apply to whole words in readline

This is what I've come up with so far: "\C-\eU": upcase-word "\C-\eL": downcase-word "\C-\eC": capitalize-word "\eu": "\C-f\eb\C-\eU" "\el": "\C-f\eb\C-\eL" "\ec": "\C-f\eb\C-\eC" Is there some ...
2
votes
2answers
610 views

How to override default bash key-bindings?

I write this config file: # ~/.inputrc Control-d: "\C-udate +'%F %T'\C-m" I want to run date command when I type Ctrl-d. But I cannot override the default behavior(exit). Thanks for your help.
15
votes
1answer
2k views

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?
6
votes
1answer
1k views

How can I enable readline for PHP 5.4 on Ubuntu 11.10?

I installed PHP 5.4 on my Ubuntu 11.10 PC like this: $ sudo add-apt-repository ppa:ondrej/php5 $ sudo apt-get update $ sudo apt-get install php5 It's working fine but I don't have the readline ...
1
vote
2answers
1k views

Can't install GNU readline on CentOS 5 (Amazon EC2)

I'm attempting to install GNU readline on a CentOS 5 so that I can use it with some Python 2.7 modules, specifically the Cmd module. I've installed Python2.7 as a standalone library per these ...
6
votes
1answer
217 views

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 ...
1
vote
1answer
356 views

Bind CTRL+W to werase (default bash behaviour in Linux/PuTTY) in iTerm2

I use a Mac at home and have changed my modifier keys swapping Command and CTRL, so CTRL+T spawns a new tab in chrome, CTRL+C is copy and so forth. I use Windows/Linux at work and I want a consistent ...
8
votes
2answers
438 views

Readline in vi mode: how can I enable up/down arrows?

When bash has vi bindings available (set -o vi), up/down arrows work in both command and insertion mode. When I setup readline's ~/.inputrc to use vi mode (set editing-mode vi), applications like ...
7
votes
1answer
299 views

Why you don't read lines with “for” in bash?

I've read that using "for" is not a good way to read lines in bash. Many people says this is clumsy and inefficient at best, and fails in many cases. I'd like to know what is the best way to read ...
0
votes
1answer
299 views

When an ssh session is forcibly disconnected, readline breaks (mac)

On Mac's iTerm app, when I ssh into remote machines and the connection is terminated by either power loss or connection failure, some of the time, readline in the terminal fails. At least, I think ...
1
vote
1answer
209 views

changing bash hotkeys

I would like to change some hotkeys in bash to match the dos prompt, because I go back and forth between them. I see that in order to change some of the hotkeys in bash, I need to change the ...
2
votes
1answer
112 views

Readline in vi mode: how can I access previously executed commands?

I recently followed this post's advice on how to make vi more ubiquitous and I changed my readline mode to vi. Before I did this, I could use the arrow keys to access previously executed commands. ...
10
votes
4answers
1k views

Is there any way to save a keyboard macro in bash?

I would like to permanently save a keyboard macro that I've recorded using C-x ( and C-x ). Is there an easy way to "see the source" for my newly recorded macro so that I can bind it to a keyboard ...
5
votes
1answer
688 views

readline: difference between vi, vi-move, vi-command, vi-insert keymaps

The readline(3) manpage lists these four (vi, vi-move, vi-command, vi-insert) as possible options for the keymap setting. I have tried setting these different options and they seem to have no effect ...
1
vote
1answer
567 views

Using readline keyboard shortcuts in OSX korn shell

I am using ksh on Mac OS X 10.6 xterm (that is, not using Terminal.app). When I try to browse the command history via CTRL+P or try to move the cursor on my prompt via CTRL+B, only the characters ^P ...
31
votes
2answers
8k views

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 ...
1
vote
1answer
265 views

libreadline history lines combine

This has been driving me crazy for about three years. I don't know how to fully describe the problem, but I think I can finally describe a way to recreate it. Your milage may vary. I have a mixture ...
0
votes
1answer
2k views

Why doesn't iPython see readline?

I am trying to compare/contrast various python tools and I would like ipython in the mix, but when I run ipython I get the readline warning even though readline is installed on my mac: WARNING: ...
2
votes
1answer
766 views

Bash readline blink-matching-paren not blinking matching parentheses

Bash readline has a setting called blink-matching-paren that is not working for me. If I type an open parenthesis on the command line, then some text, then a close parenthesis I don't get any ...
10
votes
2answers
3k views

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 ...
0
votes
1answer
640 views

(Perl) Cannot do `initialize' in Term::ReadLine::Gnu in Mac OSX 10.6

I recently installed MacPorts and I think it might have messed up some of my libraries. Now when I try to run the Perl debugger I get this: >perl -d -e 0 Cannot do `initialize' in ...
10
votes
2answers
1k views

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 ...
0
votes
2answers
305 views

Installing Heroku on Lucid Lynx reveals missing dependencies

I am trying to get a Ruby on Rails app hosted free somewhere, and Heroku is looking like my last resource. It is supposed to work on Linux, and the gem installs with no errors, but whenever I run any ...
24
votes
5answers
12k views

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, ...
10
votes
3answers
2k views

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 ...