diff --git a/docs/configuration/README.md b/docs/configuration/README.md index 9819815..01a57a3 100644 --- a/docs/configuration/README.md +++ b/docs/configuration/README.md @@ -2,6 +2,26 @@ Navi allows you to configure it with a YAML configuration. + +* [Configuring Navi](#configuring-navi) + * [Paths and Environment Variables](#paths-and-environment-variables) + * [The default configuration file path](#the-default-configuration-file-path) + * [Cheatsheets paths](#cheatsheets-paths) + * [The default cheatsheets path](#the-default-cheatsheets-path) + * [Defining the cheatsheets path with the environment variable](#defining-the-cheatsheets-path-with-the-environment-variable) + * [Defining the cheatsheets path in the configuration file](#defining-the-cheatsheets-path-in-the-configuration-file) + * [[DEPRECATED] - Using the `path` directive](#deprecated---using-the-path-directive) + * [Defining the cheatsheets path at runtime](#defining-the-cheatsheets-path-at-runtime) + * [Logging](#logging) + * [Customization](#customization) + * [Changing colors](#changing-colors) + * [fzf color scheme](#fzf-color-scheme) + * [Navi colors](#navi-colors) + * [Resizing columns](#resizing-columns) + * [Overriding fzf options](#overriding-fzf-options) + * [Defining your own delimiter](#defining-your-own-delimiter) + + ## Paths and Environment Variables On the technical side, navi uses the `directories-next` crate for rust, @@ -157,8 +177,24 @@ style: ### Overriding fzf options -If you want to override `$FZF_DEFAULT_OPTS` with `--height 3`, -you can do it with the following syntax: +You can override fzf options for two different cases: + +- During the cheats selection + + Navi exposes the `overrides` directive in the configuration file + and the `NAVI_FZF_OVERRIDES` environment variable. + +- During the pre-defined variable values selection + + Navi exposes the `overrides_var` directive in the configuration file + and the `NAVI_FZF_OVERRIDES_VAR` environment variable. + +For all cases, navi exposes the `FZF_DEFAULT_OPTS` environment variable. + +#### Overriding during cheats selection + +If you want to override do the override with `--height 3`, +you can do it with the following syntax in the configuration file: ```yaml finder: @@ -166,7 +202,16 @@ finder: overrides: --height 3 ``` -or +But you can also define the environment variable like this: + +```bash +export NAVI_FZF_OVERRIDES='--height 3' +``` + +#### Overriding during values selection + +If you want to override do the override with `--height 3`, +you can do it with the following syntax in the configuration file: ```yaml finder: @@ -174,6 +219,20 @@ finder: overrides_var: --height 3 ``` +But you can also define the environment variable like this: + +```bash +export NAVI_FZF_OVERRIDES_VAR='--height 3' +``` + +#### Overriding for all cases + +You can define the environment variable like this: + +```bash +export FZF_DEFAULT_OPTS="--height 3" +``` + > [!NOTE] > See [@junegunn/fzf](https://github.com/junegunn/fzf#layout) for more details on `$FZF_DEFAULT_OPTS`. diff --git a/docs/usage/commands/info/README.md b/docs/usage/commands/info/README.md index e69de29..5771ecf 100644 --- a/docs/usage/commands/info/README.md +++ b/docs/usage/commands/info/README.md @@ -0,0 +1,46 @@ +# The info subcommands of navi + +Navi exposes information about its default values or examples for you to use. + +## Default configuration information + +### Default configuration path + +Navi exposes its default configuration path with: + +```sh +navi info config-path +``` + +> [!NOTE] +> See [/docs/configuration/](/docs/configuration/README.md#the-default-configuration-file-path) for more details on how the default configuration path is defined. + +### Example configuration file + +Navi lets you get an example configuration file with: + +```sh +navi info config-example +``` + +> [!NOTE] +> You can retrieve this file at the following address: [/docs/examples/configuration/config-example.yaml](/docs/examples/configuration/config-example.yaml) + +For example, you can use this command to create the default configuration file, +if not already present: + +```sh +navi info config-example > "$(navi info config-path)" +``` + +## Default cheatsheets path + +Navi exposes its default cheatsheets path with: + +```sh +navi info cheats-path +``` + +> [!NOTE] +> See [/docs/configuration/](/docs/configuration/README.md#the-default-cheatsheets-path) for more details on how the cheatsheets path is defined. +