Allow disabling welcome message on launch (#2314)

* Implements #2313
This commit is contained in:
Rajasekharan Vengalil 2020-08-08 16:38:21 -07:00 committed by GitHub
parent 362bb1bea3
commit f14c0df582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -718,6 +718,18 @@ pub async fn cli(
let _ = load_plugins(&mut context);
let (mut rl, config) = set_rustyline_configuration();
let skip_welcome_message = config
.get("skip_welcome_message")
.map(|x| x.is_true())
.unwrap_or(false);
if !skip_welcome_message {
println!(
"Welcome to Nushell {} (type 'help' for more info)",
clap::crate_version!()
);
}
let use_starship = config
.get("use_starship")
.map(|x| x.is_true())

View File

@ -153,11 +153,6 @@ fn main() -> Result<(), Box<dyn Error>> {
}
None => {
println!(
"Welcome to Nushell {} (type 'help' for more info)",
clap::crate_version!()
);
let mut syncer = EnvironmentSyncer::new();
let context = create_default_context(&mut syncer, true)?;
futures::executor::block_on(nu_cli::cli(syncer, context))?;