added a bit of breakup between the startup output and the prompt to

select a config, also made the switch_config command clear the
current_input so that it's not left over when you come back.
This commit is contained in:
2026-08-19 17:04:39 -05:00
parent 8ab7a2bec4
commit 9ed69b03a0
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -33,6 +33,7 @@ pub fn startup(
app.main_tx = tx.clone();
if let Some(line) = state.config.get("alternate_configs") {
let mut selections = HashMap::new();
println!("\n");
line.split(",").into_iter().for_each(|line| {
if let Some((name, path)) = line.split_once("|") {
selections.insert(name.to_string(), path.to_string());
@@ -44,6 +45,7 @@ pub fn startup(
state.config_file.display().to_string(),
);
println!("default | {}", state.config_file.display());
println!("\n");
let response = get_user_input("which config would you like to load?")?;
if let Some(path) = selections.get(&response) {
app.load_config(PathBuf::from(path), true)?;
@@ -653,6 +655,7 @@ pub fn run_tui(
}
"switch_config" => {
switch_config = true;
state.curent_intput.clear();
break;
}
command_name => {