Skip to content

Instantly share code, notes, and snippets.

@teranex
Created February 26, 2013 16:16
Show Gist options
  • Save teranex/5039709 to your computer and use it in GitHub Desktop.
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.
#!/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