use strict;
#{{{ readme
### Author: Frank Terbeck <ft@bewatermyfriend.org>
-### GPLv2
+###
+### This file is free software: you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published
+### by the Free Software Foundation, either version 3 of the License,
+### or (at your option) any later version.
+###
+### This file is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
###
### generate grml zsh refcard.
### #v#: variables
#xprint(0, "!-> DEBUG: kbd: $kbd - value: $value - desc: $desc\n");
push(@{ $data{"keybindings-$secmap[$sec]"} }, "\\command\{$kbd\}\{$desc\}");
+ } elsif ($input[$ln] =~ m!^.*bind2maps\s+([^-])+--\s+(.*)!) {
+ my ($maps, $rest) = ($1, $2);
+ my (@a) = split /\s+/, $rest, 2;
+ if ($a[0] ne q{-s}) {
+ push(@{ $data{"keybindings-$secmap[$sec]"} },
+ "\\command\{$a[0]\}\{$desc\}");
+ return 1;
+ }
+ my $seq;
+ $rest = $a[1];
+ if ($rest =~ m!^'([^']+)'\s+!) {
+ $seq = $1;
+ } elsif ($rest =~ m!^"([^"]+)"\s+!) {
+ $seq = $1;
+ } else {
+ $seq = $rest;
+ }
+ $seq = demystify_keys($seq);
+ push(@{ $data{"keybindings-$secmap[$sec]"} }, "\\command\{$seq\}\{$desc\}");
} else {
return 0;
}