nushell/crates/nu-cli/src
Antoine Stevan 43a3983d36
REFACTOR: move the banner from the rust source to the standard library (#8406)
Related to:
- #8311 
- #8353

# Description
with the new `$nu.startup-time` from #8353 and as mentionned in #8311,
we are now able to fully move the `nushell` banner from the `rust`
source base to the standard library.

this PR
- removes all the `rust` source code for the banner
- rewrites a perfect clone of the banner to `std.nu`, called `std
banner`
- call `std banner` from `default_config.nu`

# User-Facing Changes
see the demo: https://asciinema.org/a/566521

- no config will show the banner (e.g. `cargo run --release --
--no-config-file`)
- a custom config without the `if $env.config.show_banner` block and no
call to `std banner` would never show the banner
- a custom config with the block and `config.show_banner = true` will
show the banner
- a custom config with the block and `config.show_banner = false` will
NOT show the banner

# Tests + Formatting
a new test line has been added to `tests.nu` to check the length of the
`std banner` output.
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting
```
$nothing
```

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2023-05-10 07:05:01 -05:00
..
commands fix: use buffer.len() instead of cursor_pos, so the .expect() isn't useless (#9053) 2023-05-08 13:02:01 -05:00
completions fix compilation error (#9016) 2023-04-26 14:38:09 -05:00
menus Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
config_files.rs remove nu_cli crate dependency from nu_std (#8807) 2023-04-08 13:53:43 +02:00
eval_cmds.rs Move CLI related commands to nu-cli (#8832) 2023-04-10 10:56:47 +12:00
eval_file.rs Add $env.CURRENT_FILE variable (#8861) 2023-04-13 23:33:29 +03:00
lib.rs Move CLI related commands to nu-cli (#8832) 2023-04-10 10:56:47 +12:00
nu_highlight.rs Box ShellError in Value::Error (#8375) 2023-03-12 09:57:27 +01:00
print.rs print pipeline contents in print (#8305) 2023-03-04 11:31:01 +13:00
prompt.rs FIX: add a space after the default left prompt (#9074) 2023-05-08 13:00:44 -05:00
prompt_update.rs remove nu_cli crate dependency from nu_std (#8807) 2023-04-08 13:53:43 +02:00
reedline_config.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00
repl.rs REFACTOR: move the banner from the rust source to the standard library (#8406) 2023-05-10 07:05:01 -05:00
syntax_highlight.rs Relax the closure syntax, highlight differently (#8846) 2023-04-12 05:21:52 +12:00
util.rs remove nu_cli crate dependency from nu_std (#8807) 2023-04-08 13:53:43 +02:00
validation.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00