Last active
December 14, 2015 13:38
-
-
Save tie-rack/5094613 to your computer and use it in GitHub Desktop.
I'm always typing `gi tbranch` when I mean to type `git branch`. So have this in my PATH with the name `gi`.
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/zsh | |
COMMAND=$1 | |
COMMAND=${COMMAND[2,-1]} | |
ARGUMENTS=$@[2,-1] | |
echo "\e[33mYou typed: \e[31mgi $@\e[0m" | |
echo "\e[33mYou meant: \e[32mgit $COMMAND $ARGUMENTS\e[0m" | |
echo | |
git $COMMAND ${(z)ARGUMENTS} |
Author
tie-rack
commented
Mar 5, 2013
Whoa, my name in lights! Also, my email—hmm…
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment