Skip to content

Instantly share code, notes, and snippets.

@tie-rack
Created October 3, 2013 20:36
Show Gist options
  • Save tie-rack/6816696 to your computer and use it in GitHub Desktop.
Save tie-rack/6816696 to your computer and use it in GitHub Desktop.
A little script to help out when you misplace a space.
#!/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
Author

tie-rack commented Oct 3, 2013

$ gi tstatus
You typed: gi tstatus
You meant: git status 

# On branch master
nothing to commit (working directory clean)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment