zoxide-init1
Generate shell configuration for zoxide
Usage
zoxide init
SHELL
[OPTIONS]
Overview
To initialize zoxide on your shell:
bash-
Add this to the
endof your config file (usually~/.bashrc):eval "$(zoxide init bash)"
elvish-
Add this to the
endof your config file (usually~/.elvish/rc.elv):eval $(zoxide init elvish | slurp)
Note: zoxide only supports elvish v0.18.0 and above.
fish-
Add this to the
endof your config file (usually~/.config/fish/config.fish):zoxide init fish | source
nushell-
Add this to the
endof your env file (find it by running$nu.env-pathin Nushell):zoxide init nushell | save -f ~/.zoxide.nu
Now, add this to the
endof your config file (find it by running$nu.config-pathin Nushell):source ~/.zoxide.nu
Note: zoxide only supports Nushell v0.89.0+.
powershell-
Add this to the
endof your config file (find it by runningecho$profilein PowerShell):Invoke-Expression (& { (zoxide init powershell | Out-String) })
tcsh-
Add this to the
endof your config file (usually~/.tcshrc):zoxide init tcsh > ~/.zoxide.tcsh source ~/.zoxide.tcsh
xonsh-
Add this to the
endof your config file (usually~/.xonshrc):execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')
zsh-
Add this to the
endof your config file (usually~/.zshrc):eval "$(zoxide init zsh)"
- any POSIX shell
-
Add this to the
endof your config file:eval "$(zoxide init posix --hook prompt)"
Options
-
--cmd -
Changes the prefix of the
zandzicommands.
--cmd j would change the commands to (j,ji).
--cmd cd would replace thecdcommand (doesn't work on Nushell / POSIX shells).
-
-h, --help -
Print help information.
-
--hook HOOK -
Changes how often zoxide increments a directory's score:
none Never prompt At every shell prompt pwd Whenever the directory is changed
-
--no-cmd -
Prevents zoxide from defining the
zandzicommands. These functions will still be available in your shell as__zoxide_zand__zoxide_zi, should you choose to redefine them.