From 73bfb57abdd9d88a7c1561d28e41e018bd79d15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 29 Jan 2008 19:38:59 +0000 Subject: [PATCH] * We're actually using the emacs keymap by default, and that had rl_rubout instead of rl_delete for the delete key. That was one reason for bug #1495. * The other one was that an inputrc file at /etc was ignored, the bash would only check for ~/.inputrc. If changed that now such that if ~/.inputrc could not be read, /etc/inputrc is tried. * Both of these changes close #1495. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23783 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/bash/lib/readline/bind.c | 8 +++++++- src/bin/bash/lib/readline/emacs_keymap.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bin/bash/lib/readline/bind.c b/src/bin/bash/lib/readline/bind.c index 7103888148..02c44d87af 100644 --- a/src/bin/bash/lib/readline/bind.c +++ b/src/bin/bash/lib/readline/bind.c @@ -699,6 +699,8 @@ int rl_read_init_file (filename) const char *filename; { + int result; + /* Default the filename. */ if (filename == 0) { @@ -717,7 +719,11 @@ rl_read_init_file (filename) return 0; filename = "~/_inputrc"; #endif - return (_rl_read_init_file (filename, 0)); + result = (_rl_read_init_file (filename, 0)); + if (result != 0 && filename == DEFAULT_INPUTRC) + result = (_rl_read_init_file ("/etc/inputrc", 0)); + + return result; } static int diff --git a/src/bin/bash/lib/readline/emacs_keymap.c b/src/bin/bash/lib/readline/emacs_keymap.c index ca9d1343b6..741a666023 100644 --- a/src/bin/bash/lib/readline/emacs_keymap.c +++ b/src/bin/bash/lib/readline/emacs_keymap.c @@ -174,7 +174,7 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { { ISFUNC, rl_insert }, /* | */ { ISFUNC, rl_insert }, /* } */ { ISFUNC, rl_insert }, /* ~ */ - { ISFUNC, rl_rubout }, /* RUBOUT */ + { ISFUNC, rl_delete }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Pure 8-bit characters (128 - 159).