Created
February 26, 2013 16:16
-
-
Save teranex/5039709 to your computer and use it in GitHub Desktop.
I often type `gi tcommand` instead of `git command`. This little script corrects that typo.
To use: add it as 'gi' somewhere to your $PATH and it executable.
This file contains 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/bash | |
# if the first argument starts with a t, we actually meant to execute git | |
first=$1 | |
if [ "t" == "${first:0:1}" ] | |
then | |
# remove the first argument | |
shift | |
# the pass everything to git, while removing the initial 't' from the first argument | |
git ${first:1:${#first}-1} $* | |
else | |
echo "I don't know what you are talking about bro." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment