zoxide-init - Man Page

generate shell configuration for zoxide

Synopsis

zoxide init SHELL [Options]

Description

To initialize zoxide on your shell:

bash

Add this to the end of your config file (usually ~/.bashrc):

    eval "$(zoxide init bash)"
elvish

Add this to the end of 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 end of your config file (usually ~/.config/fish/config.fish):

    zoxide init fish | source
nushell

Add this to the end of your env file (find it by running $nu.env-path in Nushell):

    zoxide init nushell | save -f ~/.zoxide.nu

Now, add this to the end of your config file (find it by running $nu.config-path in Nushell):

    source ~/.zoxide.nu

Note: zoxide only supports Nushell v0.73.0 and above.

powershell

Add this to the end of your config file (find it by running echo $profile in PowerShell):

    Invoke-Expression (& { (zoxide init powershell | Out-String) })
xonsh

Add this to the end of your config file (usually ~/.xonshrc):

    execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')
zsh

Add this to the end of your config file (usually ~/.zshrc):

    eval "$(zoxide init zsh)"
any POSIX shell

Add this to the end of your config file:

    eval "$(zoxide init posix --hook prompt)"

Options

--cmd

Changes the prefix of the z and zi commands.
--cmd j would change the commands to (j, ji).
--cmd cd would replace the cd command (doesn't work on Nushell / POSIX shells).

-h,  --help

Print help information.

--hook HOOK

Changes how often zoxide increments a directory's score:

   noneNever
   promptAt every shell prompt
   pwdWhenever the directory is changed
--no-cmd

Prevents zoxide from defining the z and zi commands. These functions will still be available in your shell as __zoxide_z and __zoxide_zi, should you choose to redefine them.

Reporting Bugs

For any issues, feature requests, or questions, please visit:

https://github.com/ajeetdsouza/zoxide/issues

Author

Ajeet D'Souza <98ajeet@gmail.com>

Referenced By

zoxide(1).

2021-04-12 zoxide