Zsh zoxide
⚙️ The ajeetdsouza/zoxide init for Zsh
**zsh zoxide** is a ⚙️ The ajeetdsouza/zoxide init for Zsh The project is written primarily in Shell, distributed under the GNU General Public License v3.0 license, first published in 2022. Key topics include: zoxide, zsh, zsh-plugins, zshell.
The <samp>ajeetdsouza/zoxide</samp>
Environment variables
| Variable | Description | Default |
|---|---|---|
| <kbd>_ZO_CMD_PREFIX</kbd> | Set variable to preferred prefix | Zi: <kbd>x</kbd>, other: <kbd>z</kbd> |
| <kbd>_ZO_DATA_DIR</kbd> | Directory in which the database is stored | Zi: <kbd>$ZPFX/share</kbd>, other: none |
All environment variables: ajeetdsouza/zoxide#environment-variables
Eval-cache options
Before setting the environment variables, you must declare the associative array:
shelltypeset -A ZEC
Set the following environment variables to change the default behavior:
| Variable | Description | Default |
|---|---|---|
| <kbd>ZEC[DISABLED]</kbd> | Disable eval-caching | <kbd>0</kbd> |
| <kbd>ZEC[DEBUG]</kbd> | Enable debug mode for eval-caching | <kbd>0</kbd> |
| <kbd>ZEC[MAX]</kbd> | Maximum number to load from cache (until force refresh) | <kbd>1000</kbd> |
Eval-cache files are stored in <kbd><samp>${Plugins[ZSH_ZOXIDE]}/._zoxide/*</samp></kbd> directory.
Install zoxide
- Official install (recommended)
- With Zi:
vimzi ice as'null' from"gh-r" sbin zi light ajeetdsouza/zoxide
Wiki: install fzf command-line fuzzy finder as Zi package.
Install zsh-zoxide
Note:
- the alternative for <kbd>zsh-zoxide</kbd> is 🌀 eval annex.
- To forcefully set <kbd>z</kbd> function include <kbd>atinit'z(){ __zoxide_z "$@"; }'</kbd> when installing with Zi (#37).
Standard syntax
vimzi ice has'zoxide' zi light z-shell/zsh-zoxide
The "For" syntax
vimzi has'zoxide' light-mode for \ z-shell/zsh-zoxide
Turbo mode + "For" syntax
vimzi has'zoxide' wait lucid for \ z-shell/zsh-zoxide
Profile startup time
After loading the plugin – shows profiling results and then unloads zsh/zprof
vimzi ice has'zoxide' atinit'zmodload zsh/zprof' \ atload'zprof | head -n 20; zmodload -u zsh/zprof' zi light z-shell/zsh-zoxide
Environment variables and usage with Zi
The plugin will call <kbd>zoxide init</kbd> with prefixed commands <kbd>x</kbd>, <kbd>xi</kbd>:
- Completions auto-loaded: commands, ice-modifiers
- Manpage auto installed: $ZI[MAN_DIR]
- Database directory set: $ZPFX/share, customizing-paths
shx 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 foo
shx ~/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 directory
shxi foo # cd with interactive selection (using fzf)
shx foo<SPACE><TAB> # show interactive completions
Environment variables and usage with other plugin managers
The plugin will call zoxide init with prefixed commands z, and zi.
Contributors
Showing top 4 contributors by commit count.
