Categorification: move uncategorized String commands to Category::Strings (#9931)

In an effort to go through and review all of the remaining commands to
find anything else that could possibly
be moved to *nu-cmd-extra*

I noticed that there are still some commands that have not been
categorized...

I am going to *Categorize* the remaining commands that still *do not
have Category homes*

In PR land I will call this *Categorification* as a play off of
*Cratification*

* str substring
* str trim
* str upcase

were in the *default* category because for some reason they had not yet
been categorized.
I went ahead and moved them to the

```rust
.category(Category::Strings)
```
This commit is contained in:
Michael Angerman
2023-08-06 09:08:45 -07:00
committed by GitHub
parent 58f98a4260
commit fa2d9a8a58
3 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
use nu_cmd_base::input_handler::{operate, CmdArgument};
use nu_engine::CallExt;
use nu_protocol::Category;
use nu_protocol::{
ast::{Call, CellPath},
engine::{Command, EngineState, Stack},
@ -66,6 +67,7 @@ impl Command for SubCommand {
"trims characters only from the end of the string",
Some('r'),
)
.category(Category::Strings)
}
fn usage(&self) -> &str {
"Trim whitespace or specific character."