2020-08-29 21:58:55 +00:00
Installation
------------
* [Installing the main binary ](#installing-the-main-binary )
* [Using Homebrew or Linuxbrew ](#using-homebrew-or-linuxbrew )
* [Using Gentoo ](#using-gentoo )
* [Using nix ](#using-nix )
* [Using cargo ](#using-cargo )
* [Using install script ](#using-install-script )
* [Downloading pre-compiled binaries ](#downloading-pre-compiled-binaries )
* [Building from source ](#building-from-source )
* [Other package managers ](#other-package-managers )
* [Installing the shell widget ](#installing-the-shell-widget )
### Installing the main binary
#### Using [Homebrew](http://brew.sh/) or [Linuxbrew](http://linuxbrew.sh/)
```sh
brew install navi
```
#### Using [Gentoo](https://gentoo.org/)
Be sure to [enable ](https://wiki.gentoo.org/wiki/Ebuild_repository ) the [GURU overlay ](https://gpo.zugaina.org/Overlays/guru/app-misc/navi ).
```sh
emerge -a app-misc/navi
```
#### Using [nix](https://nixos.org/)
```sh
nix-env -iA nixpkgs.navi
```
#### Using [cargo](https://github.com/rust-lang/cargo)
```bash
2022-01-12 11:50:55 +00:00
cargo install --locked navi
2020-08-29 21:58:55 +00:00
```
#### Using install script
```bash
bash < (curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/install)
# (optional) to set directories:
2021-04-19 12:54:35 +00:00
# BIN_DIR=/usr/local/bin bash <(curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/install)
2020-08-29 21:58:55 +00:00
```
#### Downloading pre-compiled binaries
- download the correct binary [here ](https://github.com/denisidoro/navi/releases/latest )
- extract the content to your `$PATH`
#### Building from source
```bash
git clone https://github.com/denisidoro/navi ~/.navi
cd ~/.navi
make install
# (optional) to set the install directory:
# make BIN_DIR=/usr/local/bin install
```
#### Other package managers
You can find **navi** for more package managers by clicking on the image below:
[![Packaging status ](https://repology.org/badge/vertical-allrepos/navi.svg )](https://repology.org/project/navi/versions)
Feel free to be the maintainer of **navi** for any package manager you'd like!
### Installing the shell widget
2021-04-05 13:23:47 +00:00
If you want to install it, add this line to your `.bashrc` -like file:
2020-08-29 21:58:55 +00:00
```sh
# bash
2020-09-11 18:58:34 +00:00
eval "$(navi widget bash)"
2020-08-29 21:58:55 +00:00
# zsh
2020-09-11 18:58:34 +00:00
eval "$(navi widget zsh)"
2020-08-29 21:58:55 +00:00
# fish
navi widget fish | source
2021-09-08 21:51:44 +00:00
# elvish
eval (navi widget elvish | slurp)
2020-08-29 21:58:55 +00:00
```
2020-09-11 18:58:34 +00:00
By default, `Ctrl+G` is assigned to launching **navi** .
2021-04-05 13:23:47 +00:00
There's currently no way to customize the widget behavior out-of-the-box. If you want to change the keybinding or the **navi** flags used by the widget, please:
1. run, e.g., `navi widget bash` in your terminal
2. copy the output
3. paste the output in your `.bashrc` -like file
4. edit the contents accordingly