Ajout : etc/inputrc : history-search-{back,for}ward & {back,for}ward-word & {beginnin...
authorJulien Moutinho <julm+heureux-cyclage@autogeree.net>
Wed, 17 Apr 2013 15:30:37 +0000 (17:30 +0200)
committerJulien Moutinho <julm+heureux-cyclage@autogeree.net>
Wed, 17 Apr 2013 15:53:59 +0000 (17:53 +0200)
etc/inputrc [new file with mode: 0644]
vm_hosted

diff --git a/etc/inputrc b/etc/inputrc
new file mode 100644 (file)
index 0000000..ed725a4
--- /dev/null
@@ -0,0 +1,66 @@
+# /etc/inputrc - global inputrc for libreadline
+# See readline(3readline) and `info rluserman' for more information.
+
+# Be 8 bit clean.
+set input-meta on
+set output-meta on
+
+# To allow the use of 8bit-characters like the german umlauts, uncomment
+# 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
+
+# try to enable the application keypad when it is called.  Some systems
+# need this to enable the arrow keys.
+# set enable-keypad on
+
+# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys
+
+# do not bell on tab-completion
+# set bell-style none
+# set bell-style visible
+
+# some defaults / modifications for the emacs mode
+$if mode=emacs
+
+# allow the use of the Home/End keys
+"\e[1~": beginning-of-line
+"\e[4~": end-of-line
+# NOTE: pour Mosh
+"\e[7~": beginning-of-line
+"\e[8~": end-of-line
+
+# allow the use of the Delete/Insert keys
+"\e[3~": delete-char
+"\e[2~": quoted-insert
+
+# mappings for "up" and "down" to step search the history
+"\e[A": history-search-backward
+"\e[B": history-search-forward
+
+# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
+"\e[1;5C": forward-word
+"\e[1;5D": backward-word
+"\e[5C": forward-word
+"\e[5D": backward-word
+"\e\e[C": forward-word
+"\e\e[D": backward-word
+"\e[Oc": forward-word
+"\e[Od": backward-word
+
+$if term=rxvt
+"\e[8~": end-of-line
+"\eOc": forward-word
+"\eOd": backward-word
+$endif
+
+# for non RH/Debian xterm, can't hurt for RH/Debian xterm
+# "\eOH": beginning-of-line
+# "\eOF": end-of-line
+
+# for freebsd console
+# "\e[H": beginning-of-line
+# "\e[F": end-of-line
+
+$endif
index ecf17c4..4ae7223 100755 (executable)
--- a/vm_hosted
+++ b/vm_hosted
@@ -775,6 +775,9 @@ rule_user_configure () {
        sudo install -m 644 -o root -g root \
         "$tool"/etc/bash.bashrc \
                /etc/bash.bashrc
+       sudo install -m 644 -o root -g root \
+        "$tool"/etc/inputrc \
+               /etc/inputrc
        sudo install -m 644 -o root -g root \
         "$tool"/etc/screenrc \
                /etc/screenrc