2019-08-07 19:49:11 +02:00
|
|
|
use crate::commands::command::CommandAction;
|
2019-08-19 07:16:39 +02:00
|
|
|
use crate::commands::WholeStreamCommand;
|
2019-08-07 19:49:11 +02:00
|
|
|
use crate::errors::ShellError;
|
|
|
|
use crate::prelude::*;
|
|
|
|
|
2019-08-19 07:16:39 +02:00
|
|
|
pub struct Next;
|
|
|
|
|
|
|
|
impl WholeStreamCommand for Next {
|
|
|
|
fn run(
|
|
|
|
&self,
|
|
|
|
args: CommandArgs,
|
|
|
|
registry: &CommandRegistry,
|
|
|
|
) -> Result<OutputStream, ShellError> {
|
|
|
|
next(args, registry)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn name(&self) -> &str {
|
|
|
|
"n"
|
|
|
|
}
|
|
|
|
|
|
|
|
fn signature(&self) -> Signature {
|
|
|
|
Signature::build("n")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn next(_args: CommandArgs, _registry: &CommandRegistry) -> Result<OutputStream, ShellError> {
|
2019-08-07 19:49:11 +02:00
|
|
|
Ok(vec![Ok(ReturnSuccess::Action(CommandAction::NextShell))].into())
|
|
|
|
}
|