diff --git a/crates/nu-command/src/strings/str_/substring.rs b/crates/nu-command/src/strings/str_/substring.rs index a53da20ca6..4427bc4237 100644 --- a/crates/nu-command/src/strings/str_/substring.rs +++ b/crates/nu-command/src/strings/str_/substring.rs @@ -45,7 +45,7 @@ impl Command for SubCommand { } fn usage(&self) -> &str { - "Get part of a string" + "Get part of a string. Note that the start is included but the end is excluded, and that the first character of a string is index 0." } fn search_terms(&self) -> Vec<&str> { @@ -65,7 +65,7 @@ impl Command for SubCommand { fn examples(&self) -> Vec { vec![ Example { - description: "Get a substring from the text", + description: "Get a substring \"nushell\" from the text \"good nushell\"", example: " 'good nushell' | str substring [5 12]", result: Some(Value::test_string("nushell")), },