git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
ELEric Lesh <eclesh@ucla.edu>
Date
Jul 30, 2007, 02:11 UTC
Message-ID
<87y7gyd4jd.fsf@hubert.paunchy.net>
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
Message 1 of 1 in “guilt-help: Make guilt-cmd --help show the right man page”
  1. guilt-help: Make guilt-cmd --help show the right man pageEric Lesh, Jul 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.