ignore printing default value if provided

This commit is contained in:
Florent Vilmart 2025-03-20 21:20:09 -04:00
parent 5231c1504f
commit ab9c711a5d

View File

@ -84,16 +84,9 @@ impl Command for Input {
return self.legacy_input(engine_state, stack, call, _input);
}
// FIXME: print default val if present
let default_val: Option<String> = call.get_flag(engine_state, stack, "default")?;
if let Some(prompt) = &prompt_str {
match &default_val {
None => print!("{prompt}"),
Some(val) => print!("{prompt} (default: {val})"),
}
let _ = std::io::stdout().flush();
}
let mut buf = String::new();
let prompt = ReedlinePrompt {
left_prompt: prompt_str.unwrap_or("".to_string()),