Fixup gb() function

This commit is contained in:
2018-10-17 11:02:17 +02:00
parent a9c5833457
commit ab9d28353b

View File

@@ -281,7 +281,10 @@ clip() {
}
gb() {
while [[ ! -e ./.git ]] ; do
cd ..
done
_superproject="$(git rev-parse --show-superproject-working-tree)"
if [[ -n "${_superproject}" ]] ; then
builtin cd "${_superproject}"
else
builtin cd "$(git rev-parse --show-toplevel)"
fi
}