mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
df: --output w/o "=" doesn't expect further args
"df --output ." was treated as "df --output=." and hence "." was interpreted as a column name. With this commit, "." is treated as an argument on its own. Fixes #3324
This commit is contained in:
parent
b07b71e6be
commit
a68d77b8cf
2 changed files with 7 additions and 0 deletions
|
@ -388,6 +388,8 @@ pub fn uu_app<'a>() -> Command<'a> {
|
|||
Arg::new(OPT_OUTPUT)
|
||||
.long("output")
|
||||
.takes_value(true)
|
||||
.min_values(0)
|
||||
.require_equals(true)
|
||||
.use_value_delimiter(true)
|
||||
.multiple_occurrences(true)
|
||||
.possible_values(OUTPUT_FIELD_LIST)
|
||||
|
|
|
@ -80,6 +80,11 @@ fn test_output_option() {
|
|||
new_ucmd!().arg("--output=invalid_option").fails();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_output_option_without_equals_sign() {
|
||||
new_ucmd!().arg("--output").arg(".").succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_type_option() {
|
||||
new_ucmd!().args(&["-t", "ext4", "-t", "ext3"]).succeeds();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue