add a new welcome banner to nushell (#6163)

* add a new welcome banner to nushell

* remove top line

* tweaked colors and wording

* changed to dimmed white

* removed a comment

* make config nu stand out a little

* fix type-o
This commit is contained in:
Darren Schroeder
2022-07-29 12:50:12 -05:00
committed by GitHub
parent 767201c40d
commit 7a820b1304
5 changed files with 149 additions and 2 deletions

View File

@ -81,6 +81,7 @@ pub struct Config {
pub case_sensitive_completions: bool,
pub enable_external_completion: bool,
pub trim_strategy: TrimStrategy,
pub show_banner: bool,
}
impl Default for Config {
@ -115,6 +116,7 @@ impl Default for Config {
case_sensitive_completions: false,
enable_external_completion: true,
trim_strategy: TRIM_STRATEGY_DEFAULT,
show_banner: true,
}
}
}
@ -388,6 +390,13 @@ impl Value {
}
}
"table_trim" => config.trim_strategy = try_parse_trim_strategy(value, &config)?,
"show_banner" => {
if let Ok(b) = value.as_bool() {
config.show_banner = b;
} else {
eprintln!("$config.show_banner is not a bool")
}
}
x => {
eprintln!("$config.{} is an unknown config setting", x)
}