zoxide/man/zoxide-init.1

103 lines
2.4 KiB
Groff
Raw Normal View History

2021-04-15 13:47:15 +00:00
.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
2021-04-27 12:07:38 +00:00
Add this to your configuration (usually \fI~/.bashrc\fR):
2021-04-15 13:47:15 +00:00
.sp
.nf
\fBeval "$(zoxide init bash)"\fR
.fi
.TP
.B elvish
2021-04-27 12:07:38 +00:00
Add this to your configuration (usually \fI~/.elvish/rc.elv\fR):
2021-04-15 13:47:15 +00:00
.sp
.nf
\fBeval $(zoxide init elvish | slurp)\fR
.fi
2021-08-31 10:59:57 +00:00
Note: zoxide only supports elvish v0.16.0 and above.
2021-04-15 13:47:15 +00:00
.TP
.B fish
2021-04-27 12:07:38 +00:00
Add this to your configuration (usually \fI~/.config/fish/config.fish\fR):
2021-04-15 13:47:15 +00:00
.sp
.nf
\fBzoxide init fish | source\fR
.fi
.TP
.B nushell
2021-08-05 08:52:12 +00:00
Add this to your configuration (find it by running \fBconfig path\fR in
Nushell):
2021-04-15 13:47:15 +00:00
.sp
.nf
2021-04-27 12:07:38 +00:00
\fBstartup = ["zoxide init nushell --hook prompt | save ~/.zoxide.nu", "source ~/.zoxide.nu"]\fR
2021-04-15 13:47:15 +00:00
.fi
2021-04-27 12:07:38 +00:00
.sp
2021-08-31 10:59:57 +00:00
Note: zoxide only supports Nushell v0.36.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' }
(zoxide init --hook $hook powershell) -join "`n"
})\fR
.fi
.TP
.B xonsh
2021-04-27 12:07:38 +00:00
Add this to your configuration (usually \fI~/.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-04-27 12:07:38 +00:00
Add this to your configuration (usually \fI~/.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
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
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
2021-05-26 21:04:01 +00:00
Print help information.
2021-04-15 13:47:15 +00:00
.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>