diff --git a/bin/autojump.zsh b/bin/autojump.zsh index a761206..2366b00 100644 --- a/bin/autojump.zsh +++ b/bin/autojump.zsh @@ -123,3 +123,14 @@ jco() { jo $(pwd) ${@} fi } + +# Jump around a git repo +g() { + if [[ ${1} == -* ]] && [[ ${1} != "--" ]]; then + autojump ${@} + return + else + REPO_ROOT=`git rev-parse --show-toplevel` + j "$REPO_ROOT" ${@} + fi +}