With arguments, g acts like git. Without arguments, it runs `git status`. * Source functions/* after loading ZSH completion so `compdef` is available to g alias
12 lines
170 B
Text
12 lines
170 B
Text
# 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
|