From: "martin f. krafft" <madduck@debian.org>
To: git@vger.kernel.org, pasky@suse.cz
Cc: "martin f. krafft" <madduck@debian.org>
Subject: [TopGit PATCH] Print help message when command is not proper
Date: Thu, 20 Nov 2008 13:08:48 +0100 [thread overview]
Message-ID: <1227182928-24916-1-git-send-email-madduck@debian.org> (raw)
When invoked with an unknown subcommand, or when --help is sought for
a command that does not exist, TopGit prints the help message.
Signed-off-by: martin f. krafft <madduck@debian.org>
---
tg.sh | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tg.sh b/tg.sh
index 4dcc15e..2464612 100644
--- a/tg.sh
+++ b/tg.sh
@@ -232,6 +232,8 @@ do_help()
fi
else
echo "`basename $0`: no help for $1" 1>&2
+ do_help
+ exit 1
fi
}
@@ -279,6 +281,7 @@ help|--help|-h)
*)
[ -r "@cmddir@"/tg-$cmd ] || {
echo "Unknown subcommand: $cmd" >&2
+ do_help
exit 1
}
. "@cmddir@"/tg-$cmd;;
--
tg: (f17218e..) fixes/more-help (depends on: upstream)
next reply other threads:[~2008-11-20 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 12:08 martin f. krafft [this message]
2008-11-20 13:18 ` [TopGit PATCH] Print help message when command is not proper Petr Baudis
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=1227182928-24916-1-git-send-email-madduck@debian.org \
--to=madduck@debian.org \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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