From 6b7a7ea5a7eb99bd3fc6c224d0e3bfd4e4152bcd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 9 Oct 2019 19:02:37 +0100 Subject: [PATCH] Add 'g' function Add the 'g' function as a wrapper around 'git'. --- tag-zsh/zsh/functions/g | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tag-zsh/zsh/functions/g 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