Change cal --week-start
examples + error message (#12597)
This PR fixes the example for `cal --week-start` and adds the list of expected values to the error message.
This commit is contained in:
parent
cf8fcef9bf
commit
5e52bd77e0
|
@ -77,7 +77,7 @@ impl Command for Cal {
|
||||||
},
|
},
|
||||||
Example {
|
Example {
|
||||||
description: "This month's calendar with the week starting on monday",
|
description: "This month's calendar with the week starting on monday",
|
||||||
example: "cal --week-start monday",
|
example: "cal --week-start mo",
|
||||||
result: None,
|
result: None,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -269,7 +269,7 @@ fn add_month_to_table(
|
||||||
week_start_day = s.to_string();
|
week_start_day = s.to_string();
|
||||||
} else {
|
} else {
|
||||||
return Err(ShellError::TypeMismatch {
|
return Err(ShellError::TypeMismatch {
|
||||||
err_message: "The specified week start day is invalid".to_string(),
|
err_message: "The specified week start day is invalid, expected one of ['su', 'mo', 'tu', 'we', 'th', 'fr', 'sa']".to_string(),
|
||||||
span: day.span,
|
span: day.span,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user