Files
profile/.rc.d/zoxide.sh

13 lines
328 B
Bash
Executable File

# TODO: Check if zoxide_path exists.
# TODO: Check shell better.
# -n $zoxide_path -a -n $zoxide_path
function anon() {
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
}
unset -f anon