chan.dev / posts

A Blazingly Fast zsh Git Alias

🌱 This post is in the growth phase. It may still be useful as it grows up.

Terminal window
# No arguments: `git status -sb`
# With arguments: acts like `git`
g() {
if [[ $# -gt 0 ]]; then
git $@
else
git status -sb
fi
}