From 6f1326c3e20e40d34c80bf308bd7075f00b3b943 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 17 Apr 2013 17:30:37 +0200 Subject: [PATCH] Ajout : etc/inputrc : history-search-{back,for}ward & {back,for}ward-word & {beginning-of-line,end-of-line} . --- etc/inputrc | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ vm_hosted | 3 +++ 2 files changed, 69 insertions(+) create mode 100644 etc/inputrc diff --git a/etc/inputrc b/etc/inputrc new file mode 100644 index 0000000..ed725a4 --- /dev/null +++ b/etc/inputrc @@ -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 diff --git a/vm_hosted b/vm_hosted index ecf17c4..4ae7223 100755 --- 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 -- 2.20.1