chiark
/
gitweb
/
~ian
/
topgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7692a2
)
Print help message when command is not proper
author
martin f. krafft
<madduck@debian.org>
Thu, 20 Nov 2008 14:06:19 +0000
(15:06 +0100)
committer
martin f. krafft
<madduck@debian.org>
Thu, 20 Nov 2008 14:07:07 +0000
(15:07 +0100)
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>
Acked-by: Petr Baudis <pasky@suse.cz>
tg.sh
patch
|
blob
|
history
diff --git
a/tg.sh
b/tg.sh
index afdcdda73465812fdf9c260ba10c202aef4515d1..4020527b2e27a1db9e5121275c9559c9307b92bd 100644
(file)
--- 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
}
@@
-285,6
+287,7
@@
help|--help|-h)
*)
[ -r "@cmddir@"/tg-$cmd ] || {
echo "Unknown subcommand: $cmd" >&2
+ do_help
exit 1
}
. "@cmddir@"/tg-$cmd;;