nushell/crates/nu-std/std
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
..
assert Virtual std module subdirectories (#14040) 2024-10-10 06:56:37 -05:00
bench Virtual std module subdirectories (#14040) 2024-10-10 06:56:37 -05:00
config Remove unused FlatShapes And/Or (#14476) 2024-11-29 22:23:40 +01:00
core "short" Welcome Banner option (#14638) 2024-12-25 21:36:51 +08:00
dirs Fix small typos in std/dirs (#14422) 2024-11-23 16:04:27 -06:00
dt Deprecate date to-record and date to-table (#14319) 2024-11-29 23:06:26 +01:00
formats fix multiline strings in NDNUON (#14519) 2024-12-05 07:53:33 -06:00
help make std help more user friendly (#14347) 2024-11-27 09:29:25 +08:00
input Virtual std module subdirectories (#14040) 2024-10-10 06:56:37 -05:00
iter std/iter scan: change closure signature to be consistent with reduce (#14596) 2024-12-16 06:13:51 -06:00
log Virtual std module subdirectories (#14040) 2024-10-10 06:56:37 -05:00
math Virtual std module subdirectories (#14040) 2024-10-10 06:56:37 -05:00
util Virtual std module subdirectories (#14040) 2024-10-10 06:56:37 -05:00
xml Virtual std module subdirectories (#14040) 2024-10-10 06:56:37 -05:00
mod.nu Always load default env/config values (#14249) 2024-11-20 16:15:15 -06:00