Files
repo-tools/init-repo-tools

16 lines
440 B
Bash
Executable File

#!/usr/bin/env bash
#
# Call this your shell config, e.g. ~/.zshrc, and eval the results, e.g.:
#
# eval "$(/path/to/this/repo/init-repo-tools)"
#
# Bash scripts can't change the working directory of their callers. This is
# right and proper, but changing working directory is `repo`'s entire purpose,
# so we need to work around that restriction.
#
cat <<-EOS
repo () {
cd \$($(dirname $(realpath ${BASH_SOURCE[0]}))/repo \$@)
}
EOS