Use long options for string (#10777)

This commit is contained in:
Hofer-Julian
2023-10-19 22:08:09 +02:00
committed by GitHub
parent 11480c77be
commit d0dc6986dd
21 changed files with 60 additions and 55 deletions

View File

@ -134,27 +134,27 @@ impl Command for SubCommand {
},
Example {
description: "Trim a specific character",
example: "'=== Nu shell ===' | str trim -c '=' | str trim",
example: "'=== Nu shell ===' | str trim --char '=' | str trim",
result: Some(Value::test_string("Nu shell")),
},
Example {
description: "Trim whitespace from the beginning of string",
example: "' Nu shell ' | str trim -l",
example: "' Nu shell ' | str trim --left",
result: Some(Value::test_string("Nu shell ")),
},
Example {
description: "Trim a specific character",
example: "'=== Nu shell ===' | str trim -c '='",
example: "'=== Nu shell ===' | str trim --char '='",
result: Some(Value::test_string(" Nu shell ")),
},
Example {
description: "Trim whitespace from the end of string",
example: "' Nu shell ' | str trim -r",
example: "' Nu shell ' | str trim --right",
result: Some(Value::test_string(" Nu shell")),
},
Example {
description: "Trim a specific character",
example: "'=== Nu shell ===' | str trim -r -c '='",
example: "'=== Nu shell ===' | str trim --right --char '='",
result: Some(Value::test_string("=== Nu shell ")),
},
]