Home Explore Blog CI



nushell

10th chunk of `book/configuration.md`
4421c7556094c34b3017cf351689387e5655f5c7a705a8200000000100001018
| 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`.                                                                                                                                                                                                                                                                                                      |
| 13.  | (stdlib)                        | Loads the [Standard Library](./standard_library.md) and `std-rfc` into the virtual filesystem. It is not parsed or evaluated at this point.                                                                                                                                                                                                                                    |
| 14.  | (stdlib)                        | Parses and evaluates `std/prelude`, which brings the `banner` and `pwd` commands into scope.                                                                                                                                                                                                                                                                                   |
| 15.  | (main)                          | Generates the initial [`$nu` record constant](#using-constants) so that items such as `$nu.default-config-dir` can be used in the following config files.                                                                                                                                                                                                                      |
| 16.  | (main)                          | Loads any plugins that were specified using the `--plugin` flag.                                                                                                                                                                                                                                                                                                               |
| 17.  | (repl)                          | Sets several default environment variables that only apply in the REPL (prompt-related and `SHLVL`). Note that prompt-related variables using closures are set in `default_env.nu`.                                                                                                                                                                                            |
| 18.  | (config files) (plugin)         | Processes the signatures in the user's `plugin.msgpackz` (located in the configuration directory) so that added plugins can be used in the following config files.                                                                                                                                                                                                             |
| 19.  | (config files)                  | If this is the first time Nushell has been launched, then it creates the configuration directory. "First launch" is determined by whether or not the configuration directory exists.                                                                                                                                                                                           |

Title: Nushell Startup: Standard Library, Configuration, and Plugin Loading
Summary
This section details Nushell's startup process, covering overrides from the `--include-path` flag, loading default `$env.config` values, converting the search path to a Nushell list, loading the Standard Library, parsing and evaluating `std/prelude`, generating the `$nu` record constant, loading plugins specified by the `--plugin` flag, setting REPL-specific environment variables, processing plugin signatures from `plugin.msgpackz`, and creating the configuration directory if it's the first launch.