diff --git a/src/config_files.rs b/src/config_files.rs index cf2dfb7ba..d0093fca7 100644 --- a/src/config_files.rs +++ b/src/config_files.rs @@ -92,15 +92,24 @@ pub(crate) fn read_config_file( .read_line(&mut answer) .expect("Failed to read user input"); + let config_file = include_str!("default_config.nu"); + match answer.to_lowercase().trim() { "y" | "" => { let mut output = File::create(&config_path).expect("Unable to create file"); - let config_file = include_str!("default_config.nu"); write!(output, "{}", config_file).expect("Unable to write to config file"); println!("Config file created at: {}", config_path.to_string_lossy()); } _ => { println!("Continuing without config file"); + // Just use the contents of "default_config.nu" + eval_source( + engine_state, + stack, + config_file.as_bytes(), + "default_config.nu", + PipelineData::new(Span::new(0, 0)), + ); return; } } diff --git a/src/default_config.nu b/src/default_config.nu index 0fe5ab966..bb1044348 100644 --- a/src/default_config.nu +++ b/src/default_config.nu @@ -138,7 +138,7 @@ let default_theme = { shape_int: purple_bold shape_float: purple_bold shape_range: yellow_bold - shape_internalcall: cyna_bold + shape_internalcall: cyan_bold shape_external: cyan shape_externalarg: green_bold shape_literal: blue