sc: gas/minerals icon images
[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 <:
24 use Shiar_Sheet::Keyboard 2;
25 my $info = do 'readline.eng.inc.pl' or die $@;
26 $info->{def} = do 'readline.inc.pl';
27 my $keys = Shiar_Sheet::Keyboard->new($info);
28 $keys->map($get{map}) or undef $get{map};
29 $keys->print_rows($get{rows} || '^x=213', [4,3,2]);
30 :>
31
32 <hr>
33
34 <div class="help">
35         <div class="left">
36                 <dl class="legend legend-types">
37                 <dt class="ci">info
38                         <dd>Info command: shows/does something without altering anything.
39                 <dt class="pm">motion
40                         <dd>Move the cursor.
41                 <dt class="co">history
42                         <dd>Replace contents involving kill ring, undo, or command history.
43                 <dt class="mi">change
44                         <dd>Alter current text (filtering or completion).
45                 <dt class="mo">delete
46                         <dd>Remove text.
47                 <dt class="mv">misc
48                         <dd>Miscellaneous commands.
49                 <dt class="me">mode
50                         <dd>Additional key functionality (click to view).
51                 </dl>
52         </div>
53
54         <div class="right">
55                 <dl class="legend legend-options">
56                 <dt>key<:= $sign{arg} :>
57                         <dd>Commands with a dot need a char argument afterwards.
58                 <dt class="new">&gt;v2.0
59                         <dd>Unavailable before readline version 2.1 (1997).
60                 <dt class="ext">bash
61                         <dd>Default assignment in Bash shells, but not common readline.
62                 </dl>
63
64                 <ul class="legend legend-set">
65                 <li>keyboard <strong>map</strong> is
66                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
67                 <li><strong>ascii</strong> mode is
68                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
69                                 $sign{-ascii} ? 'on' : 'off' :></em>
70                 <li><strong>keys</strong> are
71                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
72                                 !exists $get{keys} && ' by default' :>
73                 <li>default <strong>style</strong> is
74                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
75                 </ul>
76         </div>
77 </div>
78