Skip to content

Commit

Permalink
Add howto for setting environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetdsouza committed Sep 28, 2021
1 parent 49f406e commit 9176634
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,11 @@ When calling `zoxide init`, the following flags are available:

### Environment variables

Be sure to set these before calling `zoxide init`.
Environment variables<sup>[?][wiki-env]</sup> can be used for configuration.
They must be set before `zoxide init` is called.

- `_ZO_DATA_DIR`
- Specifies the directory in which `zoxide` should store its database.
- Specifies the directory in which the database is stored.
- The default value varies across OSes:
| OS | Path | Example |
| ----------- | ---------------------------------------- | ------------------------------------------ |
Expand All @@ -308,8 +309,8 @@ Be sure to set these before calling `zoxide init`.
| Windows | `;` | `$HOME;$HOME/private/*` |
- By default, this is set to `"$HOME"`.
- `_ZO_FZF_OPTS`
- Custom options to pass to [`fzf`][fzf]. See `man fzf` for the list of
options.
- Custom options to pass to [`fzf`][fzf]. See [`man fzf`][fzf-man] for the list
of options.
- `_ZO_MAXAGE`
- Configures the [aging algorithm][algorithm-aging], which limits the maximum
number of entries in the database.
Expand All @@ -320,20 +321,15 @@ Be sure to set these before calling `zoxide init`.

## Third-party integrations

- [`emacs`][emacs]. You can use `zoxide` for navigation with the
[`zoxide.el`][zoxide-el] plugin.
- [`nnn`][nnn] is a terminal file manager. You can use `zoxide` for navigation
with the official [`autojump`][nnn-autojump] plugin.
- [`ranger`][ranger] is a terminal file manager. You can use `zoxide` for
navigation with the [`ranger-zoxide`][ranger-zoxide] plugin.
- [`telescope.nvim`][telescope-nvim] is a fuzzy finder for `neovim`. You can
use it with `zoxide` via the [`telescope-zoxide`][telescope-zoxide] plugin.
- [`vim`][vim] / [`neovim`][neovim]. You can use `zoxide` for navigation with
the [`zoxide.vim`][zoxide-vim] plugin.
- [`xxh`][xxh] transports your shell configuration over SSH. You can use
`zoxide` over SSH via the [`xxh-plugin-prerun-zoxide`][xxh-zoxide] plugin.
- [`zsh-autocomplete`][zsh-autocomplete] adds realtime completions to `zsh`. It
supports `zoxide` out of the box.
| Application | Description | Plugin |
| ------------------ | --------------------------------------- | -------------------------- |
| [emacs] | Text editor | [zoxide.el] |
| [nnn] | File manager | [nnn-autojump] |
| [ranger] | File manager | [ranger-zoxide] |
| [telescope.nvim] | Fuzzy finder for Neovim | [telescope-zoxide] |
| [vim] | Text editor | [zoxide.vim] |
| [xxh] | Transports shell configuration over SSH | [xxh-plugin-prerun-zoxide] |
| [zsh-autocomplete] | Realtime completions for zsh | Supported by default |

[algorithm-aging]: https://github.com/ajeetdsouza/zoxide/wiki/Algorithm#aging
[algorithm-matching]: https://github.com/ajeetdsouza/zoxide/wiki/Algorithm#matching
Expand All @@ -354,6 +350,7 @@ Be sure to set these before calling `zoxide init`.
[fedora packages]: https://src.fedoraproject.org/rpms/rust-zoxide
[freshports]: https://www.freshports.org/sysutils/zoxide/
[fzf-installation]: https://github.com/junegunn/fzf#installation
[fzf-man]: https://manpages.ubuntu.com/manpages/en/man1/fzf.1.html
[fzf]: https://github.com/junegunn/fzf
[glob]: https://man7.org/linux/man-pages/man7/glob.7.html
[guru overlay]: https://github.com/gentoo-mirror/guru
Expand All @@ -370,15 +367,16 @@ Be sure to set these before calling `zoxide init`.
[ranger]: https://github.com/ranger/ranger
[releases]: https://github.com/ajeetdsouza/zoxide/releases
[scoop]: https://github.com/ScoopInstaller/Main/tree/master/bucket/zoxide.json
[telescope-nvim]: https://github.com/nvim-telescope/telescope.nvim
[telescope-zoxide]: https://github.com/jvgrootveld/telescope-zoxide
[telescope.nvim]: https://github.com/nvim-telescope/telescope.nvim
[termux]: https://github.com/termux/termux-packages/tree/master/packages/zoxide
[tutorial]: contrib/tutorial.webp
[ubuntu packages]: https://packages.ubuntu.com/hirsute/zoxide
[vim]: https://github.com/vim/vim
[void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/zoxide
[xxh-zoxide]: https://github.com/xxh/xxh-plugin-prerun-zoxide
[wiki-env]: https://github.com/ajeetdsouza/zoxide/wiki/HOWTO:-set-environment-variables "HOWTO: set environment variables"
[xxh-plugin-prerun-zoxide]: https://github.com/xxh/xxh-plugin-prerun-zoxide
[xxh]: https://github.com/xxh/xxh
[zoxide-el]: https://gitlab.com/Vonfry/zoxide.el
[zoxide-vim]: https://github.com/nanotee/zoxide.vim
[zoxide.el]: https://gitlab.com/Vonfry/zoxide.el
[zoxide.vim]: https://github.com/nanotee/zoxide.vim
[zsh-autocomplete]: https://github.com/marlonrichert/zsh-autocomplete
3 changes: 2 additions & 1 deletion man/zoxide.1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Print help information.
.B -V, --version
Print version information.
.SH ENVIRONMENT VARIABLES
Environment variables must be set before calling \fBzoxide-init\fR(1).
Environment variables can be used for configuration. They must be set before
\fBzoxide-init\fR(1) is called.
.TP
.B _ZO_DATA_DIR
Specifies the directory in which the database is stored. The default value
Expand Down

0 comments on commit 9176634

Please sign in to comment.