Created
March 18, 2015 05:21
-
-
Save csavage-mdsol/3ca7d668c94a42a4f8ce to your computer and use it in GitHub Desktop.
zsh git function
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
# No arguments: `git status` | |
# With arguments: acts like `git` | |
g() { | |
if [[ $# > 0 ]]; then | |
git $@ | |
else | |
git status | |
fi | |
} | |
# Complete g like git | |
compdef g=git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment