repo: Don't cd unnecessarily

This commit is contained in:
Lucas Wilson-Richter
2024-06-17 17:43:36 +10:00
parent 854c282983
commit 74693a6b3a
2 changed files with 9 additions and 3 deletions

View File

@ -10,6 +10,7 @@
#
cat <<-EOS
repo () {
cd \$($(dirname $(realpath ${BASH_SOURCE[0]}))/repo \$@)
r=\$($(dirname $(realpath ${BASH_SOURCE[0]}))/repo \$@)
[[ "\$r" != "." ]] && [[ "\$r" != "\$(pwd)/" ]] && cd \$r
}
EOS