forked from extern/nushell
Small restructuring
This commit is contained in:
@@ -11,7 +11,7 @@ impl ClassifiedCommand {
|
||||
crate fn run(
|
||||
self,
|
||||
input: VecDeque<Value>,
|
||||
context: &mut crate::Context,
|
||||
context: &mut Context,
|
||||
) -> Result<VecDeque<Value>, ShellError> {
|
||||
match self {
|
||||
ClassifiedCommand::Internal(internal) => {
|
||||
@@ -22,7 +22,7 @@ impl ClassifiedCommand {
|
||||
for v in result {
|
||||
match v {
|
||||
ReturnValue::Action(action) => match action {
|
||||
crate::CommandAction::ChangeCwd(cwd) => context.env.cwd = cwd,
|
||||
CommandAction::ChangeCwd(cwd) => context.env.cwd = cwd,
|
||||
},
|
||||
|
||||
ReturnValue::Value(v) => next.push_back(v),
|
||||
|
@@ -1,12 +1,11 @@
|
||||
use crate::errors::ShellError;
|
||||
use crate::object::Value;
|
||||
use crate::prelude::*;
|
||||
use crate::Context;
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub struct CommandArgs<'caller> {
|
||||
pub host: &'caller mut dyn Host,
|
||||
pub env: &'caller crate::Environment,
|
||||
pub env: &'caller Environment,
|
||||
pub args: Vec<Value>,
|
||||
pub input: VecDeque<Value>,
|
||||
}
|
||||
|
Reference in New Issue
Block a user