[GUILT PATCH] guilt-help: Make guilt-cmd --help show the right man page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Eric Lesh <eclesh@xxxxxxxx>
---
 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux