3 Provides unit tests and examples for the <Inputrc> lens.
9 let conf = "# /etc/inputrc - global inputrc for libreadline
10 # See readline(3readline) and `info rluserman' for more information.
16 # To allow the use of 8bit-characters like the german umlauts, uncomment
17 # the line below. However this makes the meta key not work as a meta key,
18 # which is annoying to those which don't need to type in 8-bit characters.
20 # set convert-meta off
22 # try to enable the application keypad when it is called. Some systems
23 # need this to enable the arrow keys.
24 # set enable-keypad on
26 # see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys
28 # do not bell on tab-completion
30 # set bell-style visible
32 # some defaults / modifications for the emacs mode
35 # allow the use of the Home/End keys
36 \"\\e[1~\": beginning-of-line
37 \"\\e[4~\": end-of-line
39 # allow the use of the Delete/Insert keys
40 \"\\e[3~\": delete-char
41 \"\\e[2~\": quoted-insert
43 # mappings for \"page up\" and \"page down\" to step to the beginning/end
45 # \"\\e[5~\": beginning-of-history
46 # \"\\e[6~\": end-of-history
48 # alternate mappings for \"page up\" and \"page down\" to search the history
49 # \"\\e[5~\": history-search-backward
50 # \"\\e[6~\": history-search-forward
52 # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
53 \"\\e[1;5C\": forward-word
54 \"\\e[1;5D\": backward-word
55 \"\\e[5C\": forward-word
56 \"\\e[5D\": backward-word
57 \"\\e\\e[C\": forward-word
58 \"\\e\\e[D\": backward-word
61 \"\\e[8~\": end-of-line
62 \"\\eOc\": forward-word
63 \"\\eOd\": backward-word
68 # for non RH/Debian xterm, can't hurt for RH/Debian xterm
69 # \"\\eOH\": beginning-of-line
70 # \"\\eOF\": end-of-line
73 # \"\\e[H\": beginning-of-line
74 # \"\\e[F\": end-of-line
79 (* Test: Inputrc.lns *)
80 test Inputrc.lns get conf =
81 { "#comment" = "/etc/inputrc - global inputrc for libreadline" }
82 { "#comment" = "See readline(3readline) and `info rluserman' for more information." }
84 { "#comment" = "Be 8 bit clean." }
85 { "input-meta" = "on" }
86 { "output-meta" = "on" }
88 { "#comment" = "To allow the use of 8bit-characters like the german umlauts, uncomment" }
89 { "#comment" = "the line below. However this makes the meta key not work as a meta key," }
90 { "#comment" = "which is annoying to those which don't need to type in 8-bit characters." }
92 { "#comment" = "set convert-meta off" }
94 { "#comment" = "try to enable the application keypad when it is called. Some systems" }
95 { "#comment" = "need this to enable the arrow keys." }
96 { "#comment" = "set enable-keypad on" }
98 { "#comment" = "see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys" }
100 { "#comment" = "do not bell on tab-completion" }
101 { "#comment" = "set bell-style none" }
102 { "#comment" = "set bell-style visible" }
104 { "#comment" = "some defaults / modifications for the emacs mode" }
105 { "@if" = "mode=emacs"
107 { "#comment" = "allow the use of the Home/End keys" }
109 { "mapping" = "beginning-of-line" }
112 { "mapping" = "end-of-line" }
115 { "#comment" = "allow the use of the Delete/Insert keys" }
117 { "mapping" = "delete-char" }
120 { "mapping" = "quoted-insert" }
123 { "#comment" = "mappings for \"page up\" and \"page down\" to step to the beginning/end" }
124 { "#comment" = "of the history" }
125 { "#comment" = "\"\\e[5~\": beginning-of-history" }
126 { "#comment" = "\"\\e[6~\": end-of-history" }
128 { "#comment" = "alternate mappings for \"page up\" and \"page down\" to search the history" }
129 { "#comment" = "\"\\e[5~\": history-search-backward" }
130 { "#comment" = "\"\\e[6~\": history-search-forward" }
132 { "#comment" = "mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving" }
133 { "entry" = "\\e[1;5C"
134 { "mapping" = "forward-word" }
136 { "entry" = "\\e[1;5D"
137 { "mapping" = "backward-word" }
140 { "mapping" = "forward-word" }
143 { "mapping" = "backward-word" }
145 { "entry" = "\\e\\e[C"
146 { "mapping" = "forward-word" }
148 { "entry" = "\\e\\e[D"
149 { "mapping" = "backward-word" }
152 { "@if" = "term=rxvt"
154 { "mapping" = "end-of-line" }
157 { "mapping" = "forward-word" }
160 { "mapping" = "backward-word" }
164 { "mapping" = "\",\"" }
169 { "#comment" = "for non RH/Debian xterm, can't hurt for RH/Debian xterm" }
170 { "#comment" = "\"\\eOH\": beginning-of-line" }
171 { "#comment" = "\"\\eOF\": end-of-line" }
173 { "#comment" = "for freebsd console" }
174 { "#comment" = "\"\\e[H\": beginning-of-line" }
175 { "#comment" = "\"\\e[F\": end-of-line" }