mirror of
https://github.com/nushell/nushell
synced 2025-01-10 12:19:14 +00:00
b2c5af457e
This improves incremental build time when working on what was previously the root package. For example, previously all plugins would be rebuilt with a change to `src/commands/classified/external.rs`, but now only `nu-cli` will have to be rebuilt (and anything that depends on it).
32 lines
736 B
Rust
32 lines
736 B
Rust
use crate::commands::WholeStreamCommand;
|
|
use crate::prelude::*;
|
|
use nu_errors::ShellError;
|
|
use nu_protocol::{CommandAction, ReturnSuccess, Signature};
|
|
|
|
pub struct Next;
|
|
|
|
impl WholeStreamCommand for Next {
|
|
fn name(&self) -> &str {
|
|
"n"
|
|
}
|
|
|
|
fn signature(&self) -> Signature {
|
|
Signature::build("n")
|
|
}
|
|
|
|
fn usage(&self) -> &str {
|
|
"Go to next shell."
|
|
}
|
|
|
|
fn run(
|
|
&self,
|
|
args: CommandArgs,
|
|
registry: &CommandRegistry,
|
|
) -> Result<OutputStream, ShellError> {
|
|
next(args, registry)
|
|
}
|
|
}
|
|
|
|
fn next(_args: CommandArgs, _registry: &CommandRegistry) -> Result<OutputStream, ShellError> {
|
|
Ok(vec![Ok(ReturnSuccess::Action(CommandAction::NextShell))].into())
|
|
}
|