From 4ac2b2b5efa1d54de589dccfc543834bc3aabd60 Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Thu, 18 Jul 2024 07:29:26 -0700 Subject: [PATCH] Add error conditions to usage --- crates/nu-command/src/filters/window.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/nu-command/src/filters/window.rs b/crates/nu-command/src/filters/window.rs index 1f0596e525..556543118b 100644 --- a/crates/nu-command/src/filters/window.rs +++ b/crates/nu-command/src/filters/window.rs @@ -35,6 +35,10 @@ impl Command for Window { "Creates a sliding window of `window_size` that slide by n rows/elements across input." } + fn extra_usage(&self) -> &str { + "This command will error if `window_size` or `stride` are negative or zero." + } + fn examples(&self) -> Vec { vec![ Example {