[TopGit PATCH] tg help: <something>: improve readability

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kirill Smelkov
Date: Thursday, September 18, 2008 - 9:29 am

Previously tg help was not showing Usage line, and with this change, now it
looks like e.g.:

$ tg help import
Usage: tg [...] import [-p PREFIX] RANGE...

        Import commits within the given revision range into TopGit,
        creating one topic branch per commit, the dependencies forming
        a linear sequence starting on your current branch.

        The branch names are auto-guessed from the commit messages
        and prefixed by t/ by default; use '-p PREFIX' to specify
        an alternative prefix (even an empty one).

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
---
 tg.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tg.sh b/tg.sh
index 545e1b8..08975ae 100644
--- a/tg.sh
+++ b/tg.sh
@@ -224,8 +224,12 @@ do_help()
 
 		echo "TopGit v0.3 - A different patch queue manager"
 		echo "Usage: tg [-r REMOTE] ($cmds|help) ..."
-	elif [ -r "@sharedir@/tg-$1.txt" ] ; then
-		cat "@sharedir@/tg-$1.txt"
+	elif [ -r "@cmddir@"/tg-$1 ] ; then
+		@cmddir@/tg-$1 -h || :
+		echo
+		if [ -r "@sharedir@/tg-$1.txt" ] ; then
+			cat "@sharedir@/tg-$1.txt"
+		fi
 	else
 		echo "`basename $0`: no help for $1" 1>&2
 	fi
-- 
1.6.0.2.250.g965aa

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
A couple of TopGit tweaks, Kirill Smelkov, (Thu Sep 18, 9:29 am)
[TopGit PATCH] .gitignore += vim swap files, Kirill Smelkov, (Thu Sep 18, 9:29 am)
[TopGit PATCH] tg help: <something>: improve readability, Kirill Smelkov, (Thu Sep 18, 9:29 am)
[TopGit PATCH] tg import: fix + make more robust, Kirill Smelkov, (Thu Sep 18, 9:29 am)
Re: [TopGit PATCH] .gitignore += vim swap files, martin f krafft, (Thu Sep 18, 10:24 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Kirill Smelkov, (Thu Sep 18, 10:30 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Bert Wesarg, (Thu Sep 18, 10:38 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Kirill Smelkov, (Thu Sep 18, 10:43 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Kirill Smelkov, (Thu Sep 18, 10:50 am)
Re: [TopGit PATCH] .gitignore += vim swap files, martin f krafft, (Thu Sep 18, 10:54 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Bert Wesarg, (Thu Sep 18, 10:56 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Daniel Barkalow, (Thu Sep 18, 12:30 pm)
Re: [TopGit PATCH] .gitignore += vim swap files, Kirill Smelkov, (Thu Sep 18, 10:06 pm)
Re: [TopGit PATCH] .gitignore += vim swap files, Bert Wesarg, (Fri Sep 19, 12:10 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Kirill Smelkov, (Fri Sep 19, 12:28 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Andreas Ericsson, (Fri Sep 19, 12:51 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Kirill Smelkov, (Fri Sep 19, 12:52 am)
Re: [TopGit PATCH] .gitignore += vim swap files, Bert Wesarg, (Fri Sep 19, 3:50 am)
Default exclude rules for Git, Petr Baudis, (Fri Sep 19, 7:22 am)
Re: Default exclude rules for Git, Junio C Hamano, (Fri Sep 19, 8:46 am)
Re: Default exclude rules for Git, Petr Baudis, (Fri Sep 19, 9:33 am)
Re: Default exclude rules for Git, Avery Pennarun, (Fri Sep 19, 9:42 am)