From 5e52bd77e034a1d71049e67f0491f88069419a58 Mon Sep 17 00:00:00 2001 From: woosaaahh <111681540+woosaaahh@users.noreply.github.com> Date: Sat, 20 Apr 2024 22:39:46 +0200 Subject: [PATCH] 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. --- crates/nu-command/src/generators/cal.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-command/src/generators/cal.rs b/crates/nu-command/src/generators/cal.rs index 66b7bb3ae1..f9abd47b69 100644 --- a/crates/nu-command/src/generators/cal.rs +++ b/crates/nu-command/src/generators/cal.rs @@ -77,7 +77,7 @@ impl Command for Cal { }, Example { description: "This month's calendar with the week starting on monday", - example: "cal --week-start monday", + example: "cal --week-start mo", result: None, }, ] @@ -269,7 +269,7 @@ fn add_month_to_table( week_start_day = s.to_string(); } else { 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, }); }