mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 09:06:44 +00:00
Prevent errors if zoxide fails to initialize by checking that __zoxide_z and __zoxide_zi functions exist before defining wrappers.
16 lines
329 B
Bash
16 lines
329 B
Bash
#
|
|
# zoxide Setup
|
|
#
|
|
|
|
if command-exists zoxide; then
|
|
cached-eval "$(command-path zoxide)" zoxide init --cmd zox zsh
|
|
|
|
# Use functions to allow regular zsh completion for cd to work.
|
|
if command-exists __zoxide_z; then
|
|
cd() { __zoxide_z "$@"; }
|
|
fi
|
|
if command-exists __zoxide_zi; then
|
|
alias cdi='__zoxide_zi'
|
|
fi
|
|
fi
|