diff --git a/crates/nu-command/src/strings/str_/trim/trim_.rs b/crates/nu-command/src/strings/str_/trim/trim_.rs index 863af7407..ea36f29d5 100644 --- a/crates/nu-command/src/strings/str_/trim/trim_.rs +++ b/crates/nu-command/src/strings/str_/trim/trim_.rs @@ -39,12 +39,13 @@ impl Command for SubCommand { fn signature(&self) -> Signature { Signature::build("str trim") - .input_output_types(vec![(Type::String, Type::String)]) - .vectorizes_over_list(true) - .rest( + .input_output_types(vec![(Type::String, Type::String)]) + .vectorizes_over_list(true) + .rest( "rest", SyntaxShape::CellPath, - "For a data structure input, trim strings at the given cell paths", ) + "For a data structure input, trim strings at the given cell paths", + ) .named( "char", SyntaxShape::String, @@ -53,21 +54,29 @@ impl Command for SubCommand { ) .switch( "left", - "trims characters only from the beginning of the string (default: whitespace)", + "trims characters only from the beginning of the string", Some('l'), ) .switch( "right", - "trims characters only from the end of the string (default: whitespace)", + "trims characters only from the end of the string", Some('r'), ) .switch( "all", - "trims all characters from both sides of the string *and* in the middle (default: whitespace)", + "trims all characters from both sides of the string *and* in the middle", Some('a'), ) - .switch("both", "trims all characters from left and right side of the string (default: whitespace)", Some('b')) - .switch("format", "trims spaces replacing multiple characters with singles in the middle (default: whitespace)", Some('f')) + .switch( + "both", + "trims all characters from left and right side of the string", + Some('b'), + ) + .switch( + "format", + "trims spaces replacing multiple characters with singles in the middle", + Some('f'), + ) } fn usage(&self) -> &str { "Trim whitespace or specific character"