Created
May 6, 2010 20:38
-
-
Save thenigan/392676 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# Copyright 2010, Tim Henigan <[email protected]> | |
# | |
# A simple launcher for gitk which will print usage instructions | |
# if requested | |
for i in $* | |
do | |
case "$i" in | |
-h|--h|--he|--hel|--help) | |
echo "$0 [<option>...] [<revs>] [--] [<path>...]" | |
exit 0 | |
esac | |
done | |
gitk "$@" | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure if this would be a worthwhile addition. Right now, you cannot type
gitk --help
at the command line to get usage instructions. This is due to the fact thatwish
does not allow printing to STDOUT.It is possible to use
man gitk
orgit help gitk
, but the lack ofgitk --help
can be confusing.To work around this, a launcher script can be used to look for
--help
on the command line. If it is present, then print usage instructions and exit. If it is not, then callgitk
.