From 481da343425fad73692c01e030f7da307d8d2844 Mon Sep 17 00:00:00 2001 From: cosineblast <55855728+cosineblast@users.noreply.github.com> Date: Sat, 22 Mar 2025 08:57:19 -0300 Subject: [PATCH] Rename job clear-mail to job flush --- crates/nu-command/src/default_context.rs | 2 +- .../experimental/{job_clear_mail.rs => job_flush.rs} | 10 +++++----- crates/nu-command/src/experimental/mod.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) rename crates/nu-command/src/experimental/{job_clear_mail.rs => job_flush.rs} (88%) diff --git a/crates/nu-command/src/default_context.rs b/crates/nu-command/src/default_context.rs index 655c8d9437..64e0194de4 100644 --- a/crates/nu-command/src/default_context.rs +++ b/crates/nu-command/src/default_context.rs @@ -454,7 +454,7 @@ pub fn add_shell_command_context(mut engine_state: EngineState) -> EngineState { JobId, JobSend, JobRecv, - JobClearMail, + JobFlush, Job, }; diff --git a/crates/nu-command/src/experimental/job_clear_mail.rs b/crates/nu-command/src/experimental/job_flush.rs similarity index 88% rename from crates/nu-command/src/experimental/job_clear_mail.rs rename to crates/nu-command/src/experimental/job_flush.rs index 4fc44944fc..f717cb7bae 100644 --- a/crates/nu-command/src/experimental/job_clear_mail.rs +++ b/crates/nu-command/src/experimental/job_flush.rs @@ -1,11 +1,11 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct JobClearMail; +pub struct JobFlush; -impl Command for JobClearMail { +impl Command for JobFlush { fn name(&self) -> &str { - "job clear-mail" + "job flush" } fn description(&self) -> &str { @@ -20,7 +20,7 @@ If a message is received while this command is executing, it may also be discard } fn signature(&self) -> nu_protocol::Signature { - Signature::build("job clear-mail") + Signature::build("job flush") .category(Category::Experimental) .input_output_types(vec![(Type::Nothing, Type::Nothing)]) .allow_variants_without_examples(true) @@ -50,7 +50,7 @@ If a message is received while this command is executing, it may also be discard fn examples(&self) -> Vec { vec![Example { - example: "job clear-mail", + example: "job flush", description: "Clear the mailbox of the current job.", result: None, }] diff --git a/crates/nu-command/src/experimental/mod.rs b/crates/nu-command/src/experimental/mod.rs index acf2c71e3d..ebd1dfe9c2 100644 --- a/crates/nu-command/src/experimental/mod.rs +++ b/crates/nu-command/src/experimental/mod.rs @@ -1,6 +1,6 @@ mod is_admin; mod job; -mod job_clear_mail; +mod job_flush; mod job_id; mod job_kill; mod job_list; @@ -18,7 +18,7 @@ pub use job_kill::JobKill; pub use job_list::JobList; pub use job_spawn::JobSpawn; -pub use job_clear_mail::JobClearMail; +pub use job_flush::JobFlush; pub use job_recv::JobRecv; pub use job_send::JobSend;