mirror of
https://github.com/nushell/nushell.git
synced 2025-05-29 06:17:54 +02:00
ignore printing default value if provided
This commit is contained in:
parent
5231c1504f
commit
ab9c711a5d
@ -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()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user