Git development
 help / color / mirror / Atom feed
From: Eric Lesh <eclesh@ucla.edu>
To: Josef Sipek <jsipek@cs.sunysb.edu>
Cc: Git mailing list <git@vger.kernel.org>
Subject: [GUILT PATCH] guilt-help: Make guilt-cmd --help show the right man page
Date: Sun, 29 Jul 2007 19:11:18 -0700	[thread overview]
Message-ID: <87y7gyd4jd.fsf@hubert.paunchy.net> (raw)


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

                 reply	other threads:[~2007-07-30  2:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y7gyd4jd.fsf@hubert.paunchy.net \
    --to=eclesh@ucla.edu \
    --cc=git@vger.kernel.org \
    --cc=jsipek@cs.sunysb.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox