mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-10-02 16:59:01 +00:00
112 lines
2.6 KiB
Groff
112 lines
2.6 KiB
Groff
|
.TH "zoxide-init" "1" "2021-04-12" "zoxide" "zoxide"
|
||
|
.SH NAME
|
||
|
zoxide-init - generate shell configuration for zoxide
|
||
|
.SH SYNOPSIS
|
||
|
.B zoxide init \fISHELL [OPTIONS]\fR
|
||
|
.SH DESCRIPTION
|
||
|
To initialize zoxide on your shell:
|
||
|
.TP
|
||
|
.B bash
|
||
|
Add the following line to your configuration file (usually \fI~/.bashrc\fR):
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBeval "$(zoxide init bash)"\fR
|
||
|
.fi
|
||
|
.TP
|
||
|
.B elvish
|
||
|
Add the following line to your configuration file (usually
|
||
|
\fI~/.elvish/rc.elv\fR):
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBeval $(zoxide init elvish | slurp)\fR
|
||
|
.fi
|
||
|
.TP
|
||
|
.B fish
|
||
|
Add the following line to your configuration file (usually
|
||
|
\fI~/.config/fish/config.fish\fR):
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBzoxide init fish | source\fR
|
||
|
.fi
|
||
|
.TP
|
||
|
.B nushell
|
||
|
Initialize zoxide's Nushell script:
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBzoxide init nushell --hook prompt | save ~/.zoxide.nu\fR
|
||
|
.fi
|
||
|
.sp
|
||
|
Then, in your Nushell configuration file (usually
|
||
|
\fI~/.config/nu/config.toml\fR):
|
||
|
.sp
|
||
|
* Prepend \fB__zoxide_hook;\fR to the \fBprompt\fR variable.
|
||
|
.sp
|
||
|
* Add the following lines to the \fBstartup\fR variable:
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBzoxide init nushell --hook prompt | save ~/.zoxide.nu
|
||
|
source ~/.zoxide.nu\fR
|
||
|
.fi
|
||
|
.TP
|
||
|
.B powershell
|
||
|
Add the following line to your profile:
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBInvoke-Expression (& {
|
||
|
$hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' }
|
||
|
(zoxide init --hook $hook powershell) -join "`n"
|
||
|
})\fR
|
||
|
.fi
|
||
|
.TP
|
||
|
.B xonsh
|
||
|
Add the following line to your configuration file (usually \fI~/.xonshrc\fR):
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBexecx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')\fR
|
||
|
.fi
|
||
|
.TP
|
||
|
.B zsh
|
||
|
Add the following line to your configuration file (usually \fI~/.zshrc\fR):
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBeval "$(zoxide init zsh)"\fR
|
||
|
.fi
|
||
|
.TP
|
||
|
.B Any POSIX shell
|
||
|
.sp
|
||
|
Add the following line to your configuration file:
|
||
|
.sp
|
||
|
.nf
|
||
|
\fBeval "$(zoxide init posix --hook prompt)"\fR
|
||
|
.fi
|
||
|
.SH OPTIONS
|
||
|
.TP
|
||
|
.B --cmd
|
||
|
Changes the prefix of predefined aliases (\fBz\fR, \fBzi\fR).
|
||
|
.br
|
||
|
e.g. --cmd j would change the aliases to j and ji respectively.
|
||
|
.TP
|
||
|
.B -h, --help
|
||
|
Prints help information
|
||
|
.TP
|
||
|
.B --hook \fIHOOK\fR
|
||
|
Changes how often zoxide increments a directory's score:
|
||
|
.TS
|
||
|
tab(|);
|
||
|
l l.
|
||
|
\fInone\fR|Never
|
||
|
\fIprompt\fR|At every shell prompt
|
||
|
\fIpwd\fR|Whenever the directory is changed
|
||
|
.TE
|
||
|
.TP
|
||
|
.B --no-aliases
|
||
|
Don't define extra aliases (\fBz\fR, \fBzi\fR). 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.
|
||
|
.SH REPORTING BUGS
|
||
|
For any issues, feature requests, or questions, please visit:
|
||
|
.sp
|
||
|
\fIhttps://github.com/ajeetdsouza/zoxide/issues\fR
|
||
|
.SH AUTHOR
|
||
|
Ajeet D'Souza <\fI98ajeet@gmail.com\fR>
|