diff options
Diffstat (limited to 'src/run')
| -rw-r--r-- | src/run/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs index 09051c5..751f557 100644 --- a/src/run/mod.rs +++ b/src/run/mod.rs @@ -210,13 +210,13 @@ impl Executor { }); SpawnedCmd::Builtin(handle) } - CommandKind::Fun(ast) => { + CommandKind::Fun(body) => { let mut this = self.clone(); this.args = Some(args); let handle = wait::spawn(move || { - let ast = ast.expand(&mut this)?; - let cmd = this.execute(ast, stdin, stdout); + let body = body.expand(&mut this)?; + let cmd = this.execute(body, stdin, stdout); this.exec_loop(cmd, &mut []) }); @@ -290,7 +290,7 @@ impl Executor { .lock() .unwrap() .funs - .insert(fd.name.clone(), *fd.body.body); + .insert(fd.name.clone(), fd.body); crate::export_fun::create_function_hook(self.se.clone(), &fd.name); // TODO: very ugly to ad-hoc keep export stuff & session data in sync here SpawnedCmd::Joined(Ok(())) @@ -495,7 +495,7 @@ pub fn builtin_map() -> HashMap<BString, &'static dyn Builtin> { #[derive(Clone)] pub enum CommandKind { Builtin(&'static dyn Builtin), - Fun(Ast<PreExpansion>), + Fun(Block), Path(PathBuf), } |
