Rename job clear-mail to job flush

This commit is contained in:
cosineblast 2025-03-22 08:57:19 -03:00
parent d774b1ae96
commit 481da34342
3 changed files with 8 additions and 8 deletions

View File

@ -454,7 +454,7 @@ pub fn add_shell_command_context(mut engine_state: EngineState) -> EngineState {
JobId, JobId,
JobSend, JobSend,
JobRecv, JobRecv,
JobClearMail, JobFlush,
Job, Job,
}; };

View File

@ -1,11 +1,11 @@
use nu_engine::command_prelude::*; use nu_engine::command_prelude::*;
#[derive(Clone)] #[derive(Clone)]
pub struct JobClearMail; pub struct JobFlush;
impl Command for JobClearMail { impl Command for JobFlush {
fn name(&self) -> &str { fn name(&self) -> &str {
"job clear-mail" "job flush"
} }
fn description(&self) -> &str { 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 { fn signature(&self) -> nu_protocol::Signature {
Signature::build("job clear-mail") Signature::build("job flush")
.category(Category::Experimental) .category(Category::Experimental)
.input_output_types(vec![(Type::Nothing, Type::Nothing)]) .input_output_types(vec![(Type::Nothing, Type::Nothing)])
.allow_variants_without_examples(true) .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<Example> { fn examples(&self) -> Vec<Example> {
vec![Example { vec![Example {
example: "job clear-mail", example: "job flush",
description: "Clear the mailbox of the current job.", description: "Clear the mailbox of the current job.",
result: None, result: None,
}] }]

View File

@ -1,6 +1,6 @@
mod is_admin; mod is_admin;
mod job; mod job;
mod job_clear_mail; mod job_flush;
mod job_id; mod job_id;
mod job_kill; mod job_kill;
mod job_list; mod job_list;
@ -18,7 +18,7 @@ pub use job_kill::JobKill;
pub use job_list::JobList; pub use job_list::JobList;
pub use job_spawn::JobSpawn; pub use job_spawn::JobSpawn;
pub use job_clear_mail::JobClearMail; pub use job_flush::JobFlush;
pub use job_recv::JobRecv; pub use job_recv::JobRecv;
pub use job_send::JobSend; pub use job_send::JobSend;