mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Change input list
to return null (#10913)
Now the `input list` command, when nothing is selected, will return a null instead of empty string or an empty list. Resolves #10909. # User-Facing Changes `input list` now returns a `null` when nothing is selected.
This commit is contained in:
parent
0ca8fcf58c
commit
697dee6750
1 changed files with 2 additions and 2 deletions
|
@ -235,11 +235,11 @@ impl Command for InputList {
|
|||
opts.iter().map(|s| options[*s].value.clone()).collect(),
|
||||
head,
|
||||
),
|
||||
None => Value::list(vec![], head),
|
||||
None => Value::nothing(head),
|
||||
},
|
||||
InteractMode::Single(res) => match res {
|
||||
Some(opt) => options[opt].value.clone(),
|
||||
None => Value::string("".to_string(), head),
|
||||
None => Value::nothing(head),
|
||||
},
|
||||
}
|
||||
.into_pipeline_data())
|
||||
|
|
Loading…
Reference in a new issue