diff --git a/src/cmd/init.rs b/src/cmd/init.rs index e263cda..623fb46 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -6,7 +6,7 @@ use std::path::Path; pub fn init_shell(config: Option, shell: Shell) -> Result<()> { let home_var = std::env::var("HOME").context("no $HOME set")?; let home = Path::new(&home_var); - let toml_path = std::path::Path::join(home, ".cdwe.toml") + let toml_path = std::path::Path::join(home, "cdwe.toml") .to_str() .context("failed to get toml path")? .to_string(); @@ -33,7 +33,7 @@ pub fn init_shell(config: Option, shell: Shell) -> Result<()> { std::fs::write(&shell_script_target, shell_script)?; - let toml_content: String = std::fs::read_to_string(&config_path).unwrap_or("".to_string()); + let toml_content: String = std::fs::read_to_string(&toml_path).unwrap_or("".to_string()); if toml_content.is_empty() { let default_config = Config::default_for_shell(shell); diff --git a/src/config.rs b/src/config.rs index 416179f..2ddac8b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -40,10 +40,7 @@ impl Config { }), directories: vec![EnvDirectory { path: "~".to_string(), - vars: Some(HashMap::from([( - "CDWE_ENABLED".to_string(), - "true".to_string(), - )])), + vars: None, load_from: None, run: None, aliases: None,