X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/71f5871eee199636350587c8be9596ccb8689d6f..5afa7fd2694585c96a2ce5e9b6803507f8cfe1b4:/tools/mkdigraphs-vim diff --git a/tools/mkdigraphs-vim b/tools/mkdigraphs-vim index a4bdfe8..c1dcbe4 100755 --- a/tools/mkdigraphs-vim +++ b/tools/mkdigraphs-vim @@ -1,10 +1,17 @@ #!/bin/sh -VERSION=1.01 +VERSION=1.02 + +if [ "$#" -ne 0 ] +then + echo "Usage: $0 >digraphs-vim.inc.pl" + echo 'Collect digraph data from vim, standard output as Perl hash.' + exit 64 # EX_USAGE +fi vim -e -c'echo version' -cdigraphs -cq | perl -CSD -nE ' if ($. == 1) { # head - say "# digraphs list from vim version ", s/\s*\z//r; + say "# digraphs list from vim version ", m/(\d+)\s*\z/; say "+{"; } else { # body while (/\G(\S\S) (.[^ ]*) +([0-9]+)\s+/g) {