Home Explore Blog CI



nushell

12th chunk of `book/configuration.md`
2d1744fd214ba9182e5acbc87b51b15e3bc3e9cd76d5930200000001000010e8
| 24.  | (config files) (config.nu)      | Loads a minimal `$env.config` record from the internal `default_config.nu`. This file can be viewed with: `nu config nu --default \| nu-highlight \| less -R`. Most values that are not defined in `default_config.nu` will be auto-populated into `$env.config` using their internal defaults as well.                                                                        |
| 25.  | (config files) (config.nu)      | Loads (parses and evaluates) the user's `config.nu` (the path to which was determined above).                                                                                                                                                                                                                                                                                  |
| 26.  | (config files) (login)          | When Nushell is running as a login shell, loads the user's `login.nu`.                                                                                                                                                                                                                                                                                                         |
| 27.  | (config files)                  | Loops through the vendor autoload directories and loads any `.nu` files found. The directories are processed in the order found in `$nu.vendor-autoload-dirs`, and files in those directories are processed in alphabetical order.                                                                                                                                             |
| 28.  | (config files)                  | Loops through the user autoload directories and loads any `.nu` files found. The directories are processed in the order found in `$nu.user-autoload-dirs`, and files in those directories are processed in alphabetical order.                                                                                                                                                 |
| 29.  | (repl) and (stdlib)             | Shows the banner if configured.                                                                                                                                                                                                                                                                                                                                                |
| 29.  | (repl)                          | Nushell enters the normal commandline (REPL).                                                                                                                                                                                                                                                                                                                                  |

### Flag Behavior

| Mode                | Command/Flags                              | Behavior                                                                                                                                                                                                                                                                                     |
| ------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Normal Shell        | `nu` (no flags)                            | All launch steps **_except_** those marked with **_(login)_** occur.                                                                                                                                                                                                                         |
| Login Shell         | `nu --login/-l`                            | All launch steps occur.                                                                                                                                                                                                                                                                      |

Title: Nushell Configuration Files: Autoloading, REPL, and Launch Flags
Summary
This section details the configuration file loading process in Nushell, including loading the minimal `$env.config` record from `default_config.nu`, loading the user's `config.nu`, and loading the user's `login.nu` when running as a login shell. It also describes loading `.nu` files from vendor and user autoload directories. Finally, it covers REPL banner display and the Nushell REPL entry point, along with the behavior differences between normal and login shell launches based on flags.