init: actually work
This commit is contained in:
15
init-repo-tools
Executable file
15
init-repo-tools
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/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
|
||||||
Reference in New Issue
Block a user