mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 19:45:06 +02:00
refactor: rename subcommand structs (#15309)
Came from [this discussion](https://discord.com/channels/601130461678272522/1348791953784836147/1349699872059691038) on discord with @fdncred # Description Small refactoring where I rename commands from "SubCommand" to its proper name. Motivations: better clarity (although subjective), better searchable, consistency. The only commands I didn't touch were "split list" and "ansi gradient" because of name clashes. # User-Facing Changes None # Tests + Formatting cargo fmt and clippy OK # After Submitting nothing required
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
use nu_engine::command_prelude::*;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SubCommand;
|
||||
pub struct CommandlineEdit;
|
||||
|
||||
impl Command for SubCommand {
|
||||
impl Command for CommandlineEdit {
|
||||
fn name(&self) -> &str {
|
||||
"commandline edit"
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ use nu_engine::command_prelude::*;
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SubCommand;
|
||||
pub struct CommandlineGetCursor;
|
||||
|
||||
impl Command for SubCommand {
|
||||
impl Command for CommandlineGetCursor {
|
||||
fn name(&self) -> &str {
|
||||
"commandline get-cursor"
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ mod get_cursor;
|
||||
mod set_cursor;
|
||||
|
||||
pub use commandline_::Commandline;
|
||||
pub use edit::SubCommand as CommandlineEdit;
|
||||
pub use get_cursor::SubCommand as CommandlineGetCursor;
|
||||
pub use set_cursor::SubCommand as CommandlineSetCursor;
|
||||
pub use edit::CommandlineEdit;
|
||||
pub use get_cursor::CommandlineGetCursor;
|
||||
pub use set_cursor::CommandlineSetCursor;
|
||||
|
@ -3,9 +3,9 @@ use nu_engine::command_prelude::*;
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SubCommand;
|
||||
pub struct CommandlineSetCursor;
|
||||
|
||||
impl Command for SubCommand {
|
||||
impl Command for CommandlineSetCursor {
|
||||
fn name(&self) -> &str {
|
||||
"commandline set-cursor"
|
||||
}
|
||||
|
Reference in New Issue
Block a user