Tab completion and initialization for zoxide in fish shell.
Zoxide is a smarter cd command and can be used as a direct replacement for cd in the shell. Once sourced by this plugin it provides the z command to navigate between directories, which also replaces the default cd command.
By default, tab completion for z does first complete directories and then zoxide queries, if no directories match the given string.
zi may be used for interactive selection of recently visited directories.
After installation the cd command will be aliased to z by default.
In case this is not desired
_zoxide_uninstall
may be called inconfig.fish
after the plugin was initialized to restore the old cd and keep z as a separate function.
This plugin requires that zoxide is installed and in the path.
On Ubuntu and other Debian systems, zoxide may be installed with apt:
sudo apt install zoxide
Because zoxide changes the the init script based on the version, and especially because the apt version of zoxide is still very old, this plugin does not source zoxide init fish
.
It instead provides modified copies of the required functions from zoxide version 0.8.1 with custom tab completion.
This plugin was written for fish version 3.5.0, there is no guarantee that it will work for older versions of fish.
Install with Fisher:
fisher install icezyclon/zoxide.fish
The default behavior for tab completion may change. To get the same stable version of the behavior install from a certain tag instead, e.g.
fisher install icezyclon/[email protected]
-
z plugin - a port of rupa/z. This version of z is not a direct replacement of cd as it only provides the directory tracking and queries capabilities. Furthermore, the z plugin is not affiliated to zoxide.
-
omf-autojump and omf-fzf-autojump are autojump plugins for oh-my-fish, as an alternative to zoxide.