diff --git a/tag-zsh/zsh/functions/g b/tag-zsh/zsh/functions/g new file mode 100644 index 0000000..494e716 --- /dev/null +++ b/tag-zsh/zsh/functions/g @@ -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