3 # Generate asciidoc manpage markup from Cogito quick reference file.
4 # Copyright (c) Jonas Fonseca, 2006
6 # Takes the path to the reference file. Prints the manpage to stdout.
8 PACKAGE
=${CGPACKAGE:-cogito}
18 cg-ref - Cogito quick reference
22 A list of frequently used commands grouped with related commands.
34 s/[*]\([^*]*\)[*]/\1/g
35 s/[`]\([^`]*\)[`]/\1/g
36 s/['\'']\([^'\'']*\)['\'']/\1/g
39 col1
=$
(echo "$line" | cut
-f 1)
43 echo "$line" |
sed "s/[^~]/~/g"
49 echo "$line" |
sed 's/-/./g'
53 col1
=$
(echo "$col1" |
sed 's/.*cg-refopt}/ /')
56 col2
=$
(echo "$line" |
sed 's/.*[ ]\+//')
57 printf "%-30s %s\n" "$col1" "$col2"
64 Copyright (C) Jonas Fonseca, 2006.
68 gitlink:cg-ref[7] is part of gitlink:${PACKAGE}[7],
69 a toolkit for managing gitlink:git[7] trees.