#!/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