Home Explore Blog CI



nushell

9th chunk of `book/configuration.md`
5644f59b4552701c7a292a735182661ae2004b11823e98e50000000100001018
| 3.   | (main)                          | Creates the initial `$env.NU_LIB_DIRS` variable. By default, it is an empty list.                                                                                                                                                                                                                                                                                              |
| 4.   | (main)                          | Creates the initial `$NU_LIB_DIRS` variable. By default, it includes (1) the `scripts` directory under the configuration directory, and (2) `nushell/completions` under the default data directory (either `$env.XDG_DATA_HOME` or [the default provided by the dirs crate](https://docs.rs/dirs/latest/dirs/fn.data_dir.html)). These directories are not created by default. |
| 5.   | (main)                          | Creates the initial `$env.NU_PLUGIN_DIRS` variable. By default, it is an empty list.                                                                                                                                                                                                                                                                                           |
| 6.   | (main)                          | Creates the initial `$NU_PLUGIN_DIRS` variable. By default, this will include (1) the `plugins` directory under the configuration directory, and (2) the directory where the currently running `nu`/`nu.exe` is located.                                                                                                                                                       |
| 7.   | (main)                          | Initializes the in-memory SQLite database. This allows the `stor` family of commands to be used in the following configuration files.                                                                                                                                                                                                                                          |
| 8.   | (main)                          | Processes commandline arguments such as `--plugin-config <file>`, `--plugins <list>`, and others. See `nu --help` for a complete list.                                                                                                                                                                                                                                         |
| 9.   | (main)                          | Gets the path to `env.nu` and `config.nu`. By default, these are located in the config directory, but either or both can be overridden using the `--env-config <path>` and `--config <path>` flags.                                                                                                                                                                            |
| 10.  | (main)                          | If the `--include-path (-I)` flag was used, it overrides the default `$env.NU_LIB_DIRS` that was obtained above.                                                                                                                                                                                                                                                               |
| 11.  | (main)                          | Loads the initial `$env.config` values from the internal defaults.                                                                                                                                                                                                                                                                                                             |
| 12.  | (main)                          | Converts the search path from the inherited `string` to a Nushell `list`.                                                                                                                                                                                                                                                                                                      |

Title: Nushell Startup Process: Variable Initialization and Configuration Loading
Summary
This section describes further steps in Nushell's startup process. It includes creating `$NU_PLUGIN_DIRS`, initializing an in-memory SQLite database, processing command-line arguments, determining the paths to `env.nu` and `config.nu`, handling the `--include-path` flag, loading initial `$env.config` values from internal defaults, and converting the search path to a Nushell list.