2021-09-27 23:22:27 +00:00
|
|
|
.TH "ZOXIDE" "1" "2021-04-12" "" "zoxide"
|
2021-04-15 13:47:15 +00:00
|
|
|
.SH NAME
|
2021-09-27 23:22:27 +00:00
|
|
|
\fBzoxide-init\fR - generate shell configuration for zoxide
|
2021-04-15 13:47:15 +00:00
|
|
|
.SH SYNOPSIS
|
2021-09-27 23:22:27 +00:00
|
|
|
.B zoxide init SHELL [OPTIONS]
|
2021-04-15 13:47:15 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
To initialize zoxide on your shell:
|
|
|
|
.TP
|
|
|
|
.B bash
|
2021-09-27 23:22:27 +00:00
|
|
|
Add this to your configuration (usually \fB~/.bashrc\fR):
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBeval "$(zoxide init bash)"\fR
|
|
|
|
.fi
|
|
|
|
.TP
|
|
|
|
.B elvish
|
2021-09-27 23:22:27 +00:00
|
|
|
Add this to your configuration (usually \fB~/.elvish/rc.elv\fR):
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBeval $(zoxide init elvish | slurp)\fR
|
|
|
|
.fi
|
2021-09-27 23:22:27 +00:00
|
|
|
.sp
|
2022-03-31 11:20:29 +00:00
|
|
|
Note: zoxide only supports elvish v0.18.0 and above.
|
2021-04-15 13:47:15 +00:00
|
|
|
.TP
|
|
|
|
.B fish
|
2021-09-27 23:22:27 +00:00
|
|
|
Add this to your configuration (usually \fB~/.config/fish/config.fish\fR):
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBzoxide init fish | source\fR
|
|
|
|
.fi
|
2022-07-01 09:33:30 +00:00
|
|
|
.sp
|
|
|
|
Note: zoxide only supports fish v3.4.0 and above.
|
2021-04-15 13:47:15 +00:00
|
|
|
.TP
|
|
|
|
.B nushell
|
2022-04-22 07:41:11 +00:00
|
|
|
Add this to your env file (find it by running \fB$nu.env-path\fR in Nushell):
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
2022-04-22 07:41:11 +00:00
|
|
|
\fBzoxide init nushell --hook prompt | save ~/.zoxide.nu\fR
|
2021-04-15 13:47:15 +00:00
|
|
|
.fi
|
2021-04-27 12:07:38 +00:00
|
|
|
.sp
|
2022-04-22 07:41:11 +00:00
|
|
|
Now, add this to the end of your config file (find it by running
|
|
|
|
\fB$nu.config-path\fR in Nushell):
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBsource ~/.zoxide.nu\fR
|
|
|
|
.fi
|
|
|
|
.sp
|
|
|
|
Note: zoxide only supports Nushell v0.61.0 and above.
|
2021-04-15 13:47:15 +00:00
|
|
|
.TP
|
|
|
|
.B powershell
|
2021-08-31 10:59:57 +00:00
|
|
|
Add this to your configuration (find it by running \fBecho $profile\fR in
|
|
|
|
PowerShell):
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBInvoke-Expression (& {
|
|
|
|
$hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' }
|
2021-12-14 19:43:45 +00:00
|
|
|
(zoxide init --hook $hook powershell | Out-String)
|
2021-04-15 13:47:15 +00:00
|
|
|
})\fR
|
|
|
|
.fi
|
|
|
|
.TP
|
|
|
|
.B xonsh
|
2021-09-27 23:22:27 +00:00
|
|
|
Add this to your configuration (usually \fB~/.xonshrc\fR):
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBexecx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')\fR
|
|
|
|
.fi
|
|
|
|
.TP
|
|
|
|
.B zsh
|
2021-09-27 23:22:27 +00:00
|
|
|
Add this to your configuration (usually \fB~/.zshrc\fR):
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBeval "$(zoxide init zsh)"\fR
|
|
|
|
.fi
|
|
|
|
.TP
|
2021-07-29 03:50:40 +00:00
|
|
|
.B any POSIX shell
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
2021-04-27 12:07:38 +00:00
|
|
|
Add this to your configuration:
|
2021-04-15 13:47:15 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
\fBeval "$(zoxide init posix --hook prompt)"\fR
|
|
|
|
.fi
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
|
|
.B --cmd
|
2022-04-10 22:11:51 +00:00
|
|
|
Changes the prefix of the \fBz\fR and \fBzi\fR commands.
|
2021-04-15 13:47:15 +00:00
|
|
|
.br
|
2022-04-10 22:11:51 +00:00
|
|
|
\fB--cmd j\fR would change the commands to (\fBj\fR, \fBji\fR).
|
2021-10-28 06:38:57 +00:00
|
|
|
.br
|
|
|
|
\fB--cmd cd\fR would replace the \fBcd\fR command (doesn't work on Nushell /
|
|
|
|
POSIX shells).
|
2021-04-15 13:47:15 +00:00
|
|
|
.TP
|
|
|
|
.B -h, --help
|
2021-05-26 21:04:01 +00:00
|
|
|
Print help information.
|
2021-04-15 13:47:15 +00:00
|
|
|
.TP
|
2021-09-27 23:22:27 +00:00
|
|
|
.B --hook HOOK
|
2021-04-15 13:47:15 +00:00
|
|
|
Changes how often zoxide increments a directory's score:
|
|
|
|
.TS
|
|
|
|
tab(|);
|
|
|
|
l l.
|
2021-09-27 23:22:27 +00:00
|
|
|
\fBnone\fR|Never
|
|
|
|
\fBprompt\fR|At every shell prompt
|
|
|
|
\fBpwd\fR|Whenever the directory is changed
|
2021-04-15 13:47:15 +00:00
|
|
|
.TE
|
|
|
|
.TP
|
2022-04-10 22:11:51 +00:00
|
|
|
.B --no-cmd
|
|
|
|
Prevents zoxide from defining the \fBz\fR and \fBzi\fR commands. These functions
|
|
|
|
will still be available in your shell as \fB__zoxide_z\fR and \fB__zoxide_zi\fR,
|
|
|
|
should you choose to redefine them.
|
2021-04-15 13:47:15 +00:00
|
|
|
.SH REPORTING BUGS
|
|
|
|
For any issues, feature requests, or questions, please visit:
|
|
|
|
.sp
|
2021-09-27 23:22:27 +00:00
|
|
|
\fBhttps://github.com/ajeetdsouza/zoxide/issues\fR.
|
2021-04-15 13:47:15 +00:00
|
|
|
.SH AUTHOR
|
2021-09-27 23:22:27 +00:00
|
|
|
Ajeet D'Souza <\fB98ajeet@gmail.com\fR>
|