Guilt v0.35
[guilt.git] / guilt-help
blobe1807a8370ea7585e68a591d515e88ada44b4847
1 #!/bin/sh
3 # Copyright (c) Josef "Jeff" Sipek, 2007-2011
6 DO_NOT_CHECK_BRANCH_EXISTENCE=1
8 USAGE="[<command> | <topic>]"
9 if [ -z "$GUILT_VERSION" ]; then
10 echo "Invoking `basename $0` directly is no longer supported." >&2
11 exit 1
14 _main() {
16 case $# in
18 page="guilt"
21 case "$1" in
22 guilt*)
23 # guilt --help
24 # guilt-cmd --help
25 # guilt-help guilt-foo
26 page="$1" ;;
28 # guilt-help foo
29 page="guilt-$1" ;;
30 esac
33 usage
35 esac
37 MANDIR=`dirname $0`/../man
38 MANDIR=`(cd "$MANDIR"; pwd)`
39 exec man -M "$MANDIR" "$page"