Skip to content

Instantly share code, notes, and snippets.

@tie-rack
Last active December 14, 2015 13:38
Show Gist options
  • Select an option

  • Save tie-rack/5094613 to your computer and use it in GitHub Desktop.

Select an option

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`.
#!/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}
@tie-rack
Copy link
Copy Markdown
Author

tie-rack commented Mar 5, 2013

example

@russtacular
Copy link
Copy Markdown

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