zoxide/man/man1/zoxide-init.1

112 lines
2.6 KiB
Groff
Raw Permalink Normal View History

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
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your config file (usually \fB~/.bashrc\fR):
2021-04-15 13:47:15 +00:00
.sp
.nf
\fBeval "$(zoxide init bash)"\fR
.fi
.TP
.B elvish
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your config file (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
Note: zoxide only supports elvish v0.18.0 and above.
2021-04-15 13:47:15 +00:00
.TP
.B fish
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your config file (usually
\fB~/.config/fish/config.fish\fR):
2021-04-15 13:47:15 +00:00
.sp
.nf
\fBzoxide init fish | source\fR
.fi
.TP
.B nushell
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your env file (find it by running
\fB$nu.env-path\fR in Nushell):
2021-04-15 13:47:15 +00:00
.sp
.nf
2023-01-07 17:28:10 +00:00
\fBzoxide init nushell | save -f ~/.zoxide.nu\fR
2021-04-15 13:47:15 +00:00
.fi
2021-04-27 12:07:38 +00:00
.sp
2023-05-08 17:10:04 +00:00
Now, add this to the \fBend\fR of your config file (find it by running
2022-04-22 07:41:11 +00:00
\fB$nu.config-path\fR in Nushell):
.sp
.nf
\fBsource ~/.zoxide.nu\fR
.fi
.sp
Note: zoxide only supports Nushell v0.89.0+.
2021-04-15 13:47:15 +00:00
.TP
.B powershell
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your config file (find it by running \fBecho
$profile\fR in PowerShell):
2021-04-15 13:47:15 +00:00
.sp
.nf
\fBInvoke-Expression (& { (zoxide init powershell | Out-String) })\fR
2021-04-15 13:47:15 +00:00
.fi
.TP
.B xonsh
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your config file (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
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your config file (usually \fB~/.zshrc\fR):
2021-04-15 13:47:15 +00:00
.sp
.nf
\fBeval "$(zoxide init zsh)"\fR
.fi
.TP
.B any POSIX shell
2021-04-15 13:47:15 +00:00
.sp
2023-05-08 17:10:04 +00:00
Add this to the \fBend\fR of your config file:
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
2022-08-30 14:37:58 +00:00
\fBhttps://github.com/ajeetdsouza/zoxide/issues\fR
2021-04-15 13:47:15 +00:00
.SH AUTHOR
2022-08-30 14:37:58 +00:00
Ajeet D'Souza \fB<98ajeet@gmail.com>\fR