nushell/crates/nu-protocol
Douglas 45ff964cbd
"short" Welcome Banner option (#14638)
# Description

Adds:

```nushell
$env.config.show_banner = "short"
```

This will display *only* the startup time. That was the only information
from the banner that the user couldn't possibly include in their own
config/banner (since it is `-1ns` during startup). This allows one to
create their own banner and yet still show the startup time.

Example (can be a file named `banner.nu` in autoloads:

```nushell
$env.config.show_banner = "short"

let ver = (version)
print $"(ansi blue_bold)Nushell Release:(ansi reset) ($ver.version) \(($ver.build_os)\)"
```


![image](https://github.com/user-attachments/assets/dd9d53a2-d89a-432e-8fa3-2d65072e08b1)


---

`true` and `false` settings continue to work as they do today. `true` is
still the default.

# User-Facing Changes

New configuration option:

```nushell
$env.config.show_banner = "short"
```

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

◼️ Update doc
◼️ Update `doc_config.nu`
2024-12-25 21:36:51 +08:00
..
src "short" Welcome Banner option (#14638) 2024-12-25 21:36:51 +08:00
tests add function to make env vars case-insensitive (#14390) 2024-12-03 20:47:58 -06:00
Cargo.toml Add bytes split command (#14652) 2024-12-25 07:04:43 -06:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00
README.md

nu-protocol

The nu-protocol crate holds the definitions of structs/traits that are used throughout Nushell. This gives us one way to expose them to many other crates, as well as make these definitions available to each other, without causing mutually recursive dependencies.