Pick whichever route fits your setup.
$ cargo install shell-buddy
$ brew install hjelev/tap/sb
$ git clone https://github.com/hjelev/sb.git
$ cd sb
$ cargo install --path .
Prebuilt binaries and an auto-installer script are available in GitHub Releases — the fastest setup without building from source.
Add this function to your ~/.bashrc or ~/.zshrc so your shell follows wherever you navigate:
sb() {
"$HOME/.cargo/bin/sb" "$@"
if [ -f /tmp/sb_path ]
then
cd "$(cat /tmp/sb_path)"
rm -i -f /tmp/sb_path
fi
}
Only two requirements — less and $EDITOR. Everything else is optional and degrades gracefully.