Skip to content

Commit fe855a7

Browse files
committed
Fix inputrc for rxvt usage.
When using rxvt the backspace key deletes the whole line because for rxvt and the bash prompt the backspace key produces different input. This patch ammends the handling of backspace/control-backspace for rxvt so that it only deletes one char at a time. Normal bash prompt input is left as before. Reported-by: Jon Seymour <[email protected]> Signed-off-by: Pat Thoyts <[email protected]>
1 parent 568e9a4 commit fe855a7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

etc/inputrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ set show-all-if-ambiguous off
2828
# MSYSTEM is emacs based
2929
$if mode=emacs
3030
# Common to Console & RXVT
31-
"\C-?": backward-kill-line # Ctrl-BackSpace
3231
"\e[2~": paste-from-clipboard # "Ins. Key"
3332
"\e[5~": beginning-of-history # Page up
3433
"\e[6~": end-of-history # Page down
3534

36-
$if term=msys # RXVT
35+
$if term=xterm # RXVT
36+
"\C-h": backward-kill-line
37+
"\C-?": backward-delete-char
3738
"\e[7~": beginning-of-line # Home Key
3839
"\e[8~": end-of-line # End Key
3940
"\e[11~": display-shell-version # F1
@@ -47,8 +48,7 @@ $if mode=emacs
4748
"\e[20~": "Function Key 9"
4849
"\e[21~": "Function Key 10"
4950
$else
50-
# Eh, normal Console is not really cygwin anymore, is it? Using 'else' instead. -mstormo
51-
# $if term=cygwin # Console
51+
"\C-?": backward-kill-line # Ctrl-BackSpace
5252
"\e[1~": beginning-of-line # Home Key
5353
"\e[4~": end-of-line # End Key
5454
"\e[17~": "Function Key 6"

0 commit comments

Comments
 (0)