This adds an option to install a /etc/inputrc to the target.
The generic /etc/inputrc was obtained from the buildroot
project.

Signed-off-by: Jon Ringle <[email protected]>
---
 generic/etc/inputrc |   44 ++++++++++++++++++++++++++++++++++++++++++++
 rules/readline.in   |    8 ++++++++
 rules/readline.make |    3 +++
 3 files changed, 55 insertions(+), 0 deletions(-)
 create mode 100644 generic/etc/inputrc

diff --git a/generic/etc/inputrc b/generic/etc/inputrc
new file mode 100644
index 0000000..2f1cb60
--- /dev/null
+++ b/generic/etc/inputrc
@@ -0,0 +1,44 @@
+# /etc/inputrc - global inputrc for libreadline
+# See readline(3readline) and `info readline' for more information.
+
+# Be 8 bit clean.
+set input-meta on
+set output-meta on
+set bell-style visible
+
+# To allow the use of 8bit-characters like the german umlauts, comment out
+# the line below. However this makes the meta key not work as a meta key,
+# which is annoying to those which don't need to type in 8-bit characters.
+
+# set convert-meta off
+
+"\e0d": backward-word
+"\e0c": forward-word
+"\e[h": beginning-of-line
+"\e[f": end-of-line
+"\e[1~": beginning-of-line
+"\e[4~": end-of-line
+#"\e[5~": beginning-of-history
+#"\e[6~": end-of-history
+"\e[3~": delete-char
+"\e[2~": quoted-insert
+
+# Common standard keypad and cursor
+# (codes courtsey Werner Fink, <[email protected]>)
+#"\e[1~": history-search-backward
+"\e[2~": yank
+"\e[3~": delete-char
+#"\e[4~": set-mark
+"\e[5~": history-search-backward
+"\e[6~": history-search-forward
+# Normal keypad and cursor of xterm
+"\e[F": end-of-line
+"\e[H": beginning-of-line
+# Application keypad and cursor of xterm
+"\eOA": previous-history
+"\eOC": forward-char
+"\eOB": next-history
+"\eOD": backward-char
+"\eOF": end-of-line
+"\eOH": beginning-of-line
+
diff --git a/rules/readline.in b/rules/readline.in
index 2c01ce8..d531c7c 100644
--- a/rules/readline.in
+++ b/rules/readline.in
@@ -33,3 +33,11 @@ choice
                  Links the readline library against the ncurses library
 
 endchoice
+
+config READLINE_ETC_INPUTRC
+       depends on READLINE
+       bool
+       prompt "install /etc/inputrc"
+       help
+         If enabled, it installs the "./projectroot/etc/inputrc" file if
+         present, else a generic one from the ptxdist directory.
diff --git a/rules/readline.make b/rules/readline.make
index 5ee8dac..4283471 100644
--- a/rules/readline.make
+++ b/rules/readline.make
@@ -77,6 +77,9 @@ $(STATEDIR)/readline.targetinstall:
        @$(call install_link, readline, libreadline.so.5.2, 
/lib/libreadline.so.5)
        @$(call install_link, readline, libreadline.so.5.2, /lib/libreadline.so)
 
+ifdef PTXCONF_READLINE_ETC_INPUTRC
+       @$(call install_alternative, readline, 0, 0, 0644, /etc/inputrc, n)
+endif
        @$(call install_finish, readline)
 
        @$(call touch)
-- 
1.6.3.9.g6345


--
ptxdist mailing list
[email protected]

Reply via email to