2 ms·
You can use `ranger` to interactively navigate to and select a directory: cdranger() { local tmpfile="$(mktemp)" local cdto ranger --show-o
by penguin_booze 2y ago
You can use `ranger` to interactively navigate to and select a directory:
cdranger() {
local tmpfile="$(mktemp)"
local cdto
ranger --show-only-dirs --choosedir="$tmpfile" "$@"
cdto="$(cat $tmpfile)"
rm -f "$tmpfile"
if [ "$cdto" ]; then
cd "$cdto"
fi
}