Automatically displaying manpage when calling a helper with -h or --help.

This commit is contained in:
Daniel Baumann 2009-01-30 18:16:59 +01:00
parent e72f1790d4
commit 992a145afd
3 changed files with 19 additions and 2 deletions

View File

@ -43,7 +43,7 @@ Arguments ()
;;
-h|--help)
Help
Man
shift
;;

17
functions/man.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# man.sh - print man information
# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
Man ()
{
if [ -x "$(which man 2>/dev/null)" ]
then
man $(basename ${0})
exit 0
fi
}

View File

@ -31,7 +31,7 @@ USAGE="FIXME"
case "${1}" in
-h|--help)
Help
Man
;;
-u|--usage)