From 170507a85cde7f42f96f485655aaf2ee88ce1f8b Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 2 Jul 2018 16:26:21 +0200 Subject: [PATCH] bash: support home and end keys This commit contains a patch of bash's built-in default escape sequences to match the 'screen' terminal as used by Genode's terminal component. Fixes #2705 --- repos/ports/ports/bash.hash | 2 +- repos/ports/ports/bash.port | 3 ++- repos/ports/src/noux-pkg/bash/home_end.patch | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 repos/ports/src/noux-pkg/bash/home_end.patch diff --git a/repos/ports/ports/bash.hash b/repos/ports/ports/bash.hash index 5a6aba9109..4874644b38 100644 --- a/repos/ports/ports/bash.hash +++ b/repos/ports/ports/bash.hash @@ -1 +1 @@ -684c11f9930bea31e50453bf0c26fa3411dfed0c +02edac1a780fc13b59c3c8ad64cc6d390d1e9cc5 diff --git a/repos/ports/ports/bash.port b/repos/ports/ports/bash.port index 598bf1879e..1bb1d159d0 100644 --- a/repos/ports/ports/bash.port +++ b/repos/ports/ports/bash.port @@ -10,5 +10,6 @@ DIR(bash) := src/noux-pkg/bash PATCHES := src/noux-pkg/bash/build.patch \ src/noux-pkg/bash/check_dev_tty.patch \ - src/noux-pkg/bash/disable_man2html.patch + src/noux-pkg/bash/disable_man2html.patch \ + src/noux-pkg/bash/home_end.patch PATCH_OPT := -p1 -d src/noux-pkg/bash diff --git a/repos/ports/src/noux-pkg/bash/home_end.patch b/repos/ports/src/noux-pkg/bash/home_end.patch new file mode 100644 index 0000000000..796860d109 --- /dev/null +++ b/repos/ports/src/noux-pkg/bash/home_end.patch @@ -0,0 +1,18 @@ +This patch adjust the default encoding for the home and end keys to match the +'screen' terminal as used by Genode. It is related to the following issue: + + https://github.com/genodelabs/genode/issues/2705 + +--- a/lib/readline/readline.c ++++ b/lib/readline/readline.c +@@ -1293,8 +1293,8 @@ + rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history); + rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char); + rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char); +- rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line); +- rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line); ++ rl_bind_keyseq_if_unbound ("\033[1~", rl_beg_of_line); ++ rl_bind_keyseq_if_unbound ("\033[4~", rl_end_of_line); + + #if defined (__MINGW32__) + rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);