* [GUILT PATCH] guilt-help: Make guilt-cmd --help show the right man page
@ 2007-07-30 2:11 Eric Lesh
0 siblings, 0 replies; only message in thread
From: Eric Lesh @ 2007-07-30 2:11 UTC (permalink / raw)
To: Josef Sipek; +Cc: Git mailing list
Signed-off-by: Eric Lesh <eclesh@ucla.edu>
---
guilt | 8 +++++++-
guilt-help | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/guilt b/guilt
index f67bfb5..6a69261 100755
--- a/guilt
+++ b/guilt
@@ -11,7 +11,13 @@ GUILT_NAME="Los"
case $1 in
-h|--h|--he|--hel|--help)
shift
- exec "guilt-help" "$@"
+ if [ -z "$@" ]; then
+ # guilt-cmd --help or guilt cmd --help
+ exec "guilt-help" `basename $0`
+ else
+ # guilt --help cmd
+ exec "guilt-help" "$@"
+ fi
exit
;;
-V|--ver|--versi|--versio|--version)
diff --git a/guilt-help b/guilt-help
index 274246b..e2340d9 100755
--- a/guilt-help
+++ b/guilt-help
@@ -14,7 +14,8 @@ case $# in
;;
1)
if [ "$1" != "guilt" ]; then
- page="guilt-$1"
+ cmd=$(echo "$1" | sed -e 's/guilt-//')
+ page="guilt-$cmd"
else
page="guilt"
fi
--
1.5.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-30 2:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30 2:11 [GUILT PATCH] guilt-help: Make guilt-cmd --help show the right man page Eric Lesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox