| Variable | Description | Default |
|---|---|---|
| _ZO_CMD_PREFIX | Set variable to preferred prefix | Zi: x, other: z |
| _ZO_DATA_DIR | Directory in which the database is stored | Zi: $ZPFX/share, other: none |
All environment variables: ajeetdsouza/zoxide#environment-variables
Before setting the environment variables, you must declare the associative array:
typeset -A ZECSet the following environment variables to change the default behavior:
| Variable | Description | Default |
|---|---|---|
| ZEC[DISABLED] | Disable eval-caching | 0 |
| ZEC[DEBUG] | Enable debug mode for eval-caching | 0 |
| ZEC[MAX] | Maximum number to load from cache (until force refresh) | 1000 |
Eval-cache files are stored in ${Plugins[ZSH_ZOXIDE]}/._zoxide/* directory.
- Official install (recommended)
- With Zi:
zi ice as'null' from"gh-r" sbin
zi light ajeetdsouza/zoxideWiki: install fzf command-line fuzzy finder as Zi package.
Note:
- the alternative for zsh-zoxide is 🌀 eval annex.
- To forcefully set z function include atinit'z(){ __zoxide_z "$@"; }' when installing with Zi (#37).
zi ice has'zoxide'
zi light z-shell/zsh-zoxidezi has'zoxide' light-mode for \
z-shell/zsh-zoxideTurbo mode + "For" syntax
zi has'zoxide' wait lucid for \
z-shell/zsh-zoxideAfter loading the plugin – shows profiling results and then unloads zsh/zprof
zi ice has'zoxide' atinit'zmodload zsh/zprof' \
atload'zprof | head -n 20; zmodload -u zsh/zprof'
zi light z-shell/zsh-zoxideThe plugin will call zoxide init with prefixed commands x, xi:
- Completions auto-loaded: commands, ice-modifiers
- Manpage auto installed: $ZI[MAN_DIR]
- Database directory set: $ZPFX/share, customizing-paths
x foo # cd into highest ranked directory matching foo
x foo bar # cd into highest ranked directory matching foo and bar
x foo / # cd into a subdirectory starting with foox ~/foo # x also works like a regular cd command
x foo/ # cd into relative path
x .. # cd one level up
x - # cd into the previous directoryxi foo # cd with interactive selection (using fzf)x foo<SPACE><TAB> # show interactive completionsThe plugin will call zoxide init with prefixed commands z, and zi.
