Added loginshell config file #4620 (#5714)

* Added loginshell config file #4620

* added sample login.nu

* added environment variable loginshell-path
This commit is contained in:
sec65
2022-06-06 13:52:37 +02:00
committed by GitHub
parent 75b2d26187
commit 3c421c5726
5 changed files with 47 additions and 1 deletions

View File

@ -1196,6 +1196,7 @@ pub fn eval_variable(
if let Some(mut config_path) = nu_path::config_dir() {
config_path.push("nushell");
let mut env_config_path = config_path.clone();
let mut loginshell_path = config_path.clone();
let mut history_path = config_path.clone();
@ -1222,6 +1223,14 @@ pub fn eval_variable(
val: env_config_path.to_string_lossy().to_string(),
span,
});
loginshell_path.push("login.nu");
output_cols.push("loginshell-path".into());
output_vals.push(Value::String {
val: loginshell_path.to_string_lossy().to_string(),
span,
});
}
#[cfg(feature = "plugin")]