font: page to list character support
[sheet.git] / readline.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'readline cheat sheet',
5         version => 'v1.1',
6         description => [
7                 "Reference sheet of default key bindings for GNU readline,",
8                 "used for line-editing in most Unix software, notably Emacs and Bash.",
9         ],
10         keywords => [qw'
11                 readline gnu bash emacs sheet cheat reference overview keyboard editing curses
12         '],
13         charset => $sign{charset},
14         stylesheet => [qw'light dark circus mono red terse'],
15         keys => 1,
16 });
17
18 :>
19 <h1>readline cheat sheet</h1>
20
21 <h2>default emacs mode</h2>
22
23 <ul id="rows">
24
25 <li class="row">
26         <ul class="keys omni">
27         <li class="me" onclick="setmode()"><b>Esc</b> +
28         </ul>
29 </li>
30
31 <:
32 use Shiar_Sheet::Keyboard 2;
33 my $info = do 'readline.eng.inc.pl' or die $@;
34 $info->{def} = do 'readline.inc.pl';
35 my $keys = Shiar_Sheet::Keyboard->new($info);
36 $keys->map($get{map}) or undef $get{map};
37 $keys->print_rows($get{rows} || '^x=213', [4,3,2]);
38 :>
39 </ul>
40
41 <hr>
42
43 <div class="help">
44         <div class="left">
45                 <dl class="legend legend-types">
46                 <dt class="ci">info
47                         <dd>Info command: shows/does something without altering anything.
48                 <dt class="pm">motion
49                         <dd>Move the cursor.
50                 <dt class="co">history
51                         <dd>Replace contents involving kill ring, undo, or command history.
52                 <dt class="mi">change
53                         <dd>Alter current text (filtering or completion).
54                 <dt class="mo">delete
55                         <dd>Remove text.
56                 <dt class="mv">misc
57                         <dd>Miscellaneous commands.
58                 <dt class="me">mode
59                         <dd>Additional key functionality (click to view).
60                 </dl>
61         </div>
62
63         <div class="right">
64                 <dl class="legend legend-options">
65                 <dt>key<:= $sign{arg} :>
66                         <dd>Commands with a dot need a char argument afterwards.
67                 <dt class="new">&gt;v2.0
68                         <dd>Unavailable before readline version 2.1 (1997).
69                 <dt class="ext">bash
70                         <dd>Default assignment in Bash shells, but not common readline.
71                 </dl>
72
73                 <ul class="legend legend-set">
74                 <li>keyboard <strong>map</strong> is
75                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
76                 <li><strong>ascii</strong> mode is
77                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
78                                 $sign{-ascii} ? 'on' : 'off' :></em>
79                 <li><strong>keys</strong> are
80                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
81                                 !exists $get{keys} && ' by default' :>
82                 <li>default <strong>style</strong> is
83                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
84                 </ul>
85         </div>
86 </div>
87