Add 'g' function
Add the 'g' function as a wrapper around 'git'.
This commit is contained in:
parent
70e3fe7faa
commit
6b7a7ea5a7
12
tag-zsh/zsh/functions/g
Normal file
12
tag-zsh/zsh/functions/g
Normal file
|
@ -0,0 +1,12 @@
|
|||
# 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
|
Loading…
Reference in a new issue