Questions tagged [inputrc]

37 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
38
votes
2 answers

Putty SSH: CTRL+Cursor keys don't work skip to previous/next word

When I am connected to my local Ubuntu dev server with putty (from my Windows 7 box) via SSH, the following key combinations don't work to move the cursor forward and backward on word boundaries: Ctrl+Left Arrow on the cursor pad Ctrl+Right Arrow…
user26767
  • 591
  • 1
  • 7
  • 10
34
votes
9 answers

change bash shortcut keys such as Ctrl-C?

I am using Kubuntu 10.04. I would like to change some of the standard shortcut keys for bash (terminal). Here are the shortcuts I would like to set up: Ctrl-C to copy the selected text in the terminal to the clipboard. Ctrl-V to paste from the…
Paul
  • 553
  • 1
  • 4
  • 8
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
31
votes
1 answer

Understanding control characters in .inputrc

My Linux account in a remote machine comes with the following pre-defined .inputrc "\e[1~": beginning-of-line "\e[4~": end-of-line “\e[5~”: history-search-backward “\e[6~”: history-search-forward "\e[3~": delete-char "\e[2~": quoted-insert "\e[5C":…
Amelio Vazquez-Reina
  • 6,878
  • 21
  • 62
  • 83
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
12
votes
3 answers

Enable alt/ctrl + left/right on CentOS command line

My hoster recently updated to a new CentOS and I've been 'personalizing' it and now I'm missing something. On my home Ubuntu Server I can forward-word and backward-word with ALT + RIGHT / LEFT. I didn't do anything for that. I can also ALT +…
Rudie
  • 739
  • 1
  • 9
  • 19
12
votes
5 answers

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 shortcut in ~/.inputrc? I thought dump-macros would…
mgalgs
  • 2,312
  • 4
  • 23
  • 33
6
votes
2 answers

~/.inputrc causes CTRL+arrows not to work

When ~/.inputrc does not exist, hitting Ctrl+Left Arrow and Ctrl+Right Arrow on a Bash command line moves the cursor back and forward by one word, respectively. However, if ~/.inputrc exists (regardless of whether or not it's empty), those two key…
nickh
  • 163
  • 4
6
votes
2 answers

Bash's equivalent of Tcsh's ESC+p

I'm moving from Tcsh to Bash, and I would like to take the ESC+p feature with me. If I type , say git cl, and then press ESC+p, it should complete automatically to the last command that starts with git cl (e.g. git clone something), and place the…
Misha Moroshko
  • 7,423
  • 9
  • 26
  • 31
4
votes
1 answer

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 a different app gives bash a command: (arg:…
Cody Hess
  • 157
  • 8
4
votes
0 answers

How can I get bash to perform case insensitive tab-completion for my aliases and functions?

I have an alias like this: alias sshUntrusted='ssh -X -C -c blowfish-cbc,arcfour' But when I type $ sshun followed by Tab, Bash does not complete the alias. I have put set completion-ignore-case on #ignore case while completing in my .bashrc,…
FooBee
  • 141
  • 4
4
votes
1 answer

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 Insert/Delete, Home/End, PgUp/PgDown keys... Could you…
fooness
  • 41
  • 1
  • 6
4
votes
2 answers

page up/down print ~ instead of history search in terminal

I am on a Macbook Pro with mac os x 10.8.2 I have set: page up: \033[5~ page down: \033[6~ in terminal keyboard settings (pressing esc to get \033). My ~/.xinputrc is: # Be 8 bit clean. set input-meta on set output-meta on set convert-meta off #…
Desmond
  • 143
  • 1
  • 6
4
votes
1 answer

Move vi mode string to end of bash prompt

I use vi editing mode in bash. I have "show-mode-in-prompt" set to "on" in ~/.inputrc. show-mode-in-prompt (Off) If set to On, add a string to the beginning of the prompt indicating the editing mode: emacs, vi command, or vi insertion. The mode…
Josh Cooley
  • 241
  • 2
  • 9
1
2 3