Files
profile/.rc.d/zoxide.sh
2024-09-24 12:24:20 -07:00

12 lines
307 B
Bash
Executable File

# TODO: Check if zoxide_path exists.
# TODO: Check shell better.
# -n $zoxide_path -a -n $zoxide_path
function {
zoxide_path=$(which zoxide)
if [ -n $zoxide_path -a $zoxide_path != "zoxide not found" ]; then
if [ "$SHELL" = "/bin/zsh" ]; then
eval "$(zoxide init --cmd cd zsh)"
fi
fi
}