A friendly tmp-program script
cargo install --path .
source /path/to/repostiory/checkout/newdir.sh
in one of your init files, e.g. .zshrc
.OR
cargo install newdir
alias newdir='eval $(~/.cargo/bin/newdir)'
in one of your init files, e.g. .zshrc
.Unfortunately, since cd
is always (I think?) a shell-builtin, newdir
cannot
actually change your current working directory for you, so there needs to be some
workaround, like with the alias proposed in this README.
console
$ echo $PWD
/home/tronje
$ newdir
cd /tmp/tronje/jolly_weasel
$ echo $PWD
/tmp/tronje/jolly_weasel