1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Adding g to zsh

This commit is contained in:
Mitchell Ludwig 2019-11-22 12:14:25 -07:00
parent dc2d7c10c4
commit e42645df00

View File

@ -123,3 +123,14 @@ jco() {
jo $(pwd) ${@} jo $(pwd) ${@}
fi 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
}