aboutsummaryrefslogtreecommitdiffstats
path: root/src/run/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/run/mod.rs')
-rw-r--r--src/run/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs
index c0a108a..18d3f0a 100644
--- a/src/run/mod.rs
+++ b/src/run/mod.rs
@@ -143,8 +143,10 @@ impl Executor {
None => Box::new(io::stdout()),
};
- let cloned_session = self.se.clone();
+ // currently only required for `re`, cannot happen in background thread
+ builtin.special(self.se.clone(), &cmd.args);
+ let cloned_session = self.se.clone();
let handle = std::thread::spawn(move || {
builtin.io(cloned_session, &cmd.args, &mut input, &mut output)
});
@@ -283,6 +285,8 @@ type BuiltinResult = Result<(), BuiltinError>;
pub trait Builtin: Send + Sync {
fn name(&self) -> &str;
+ fn special(&self, session: Arc<Mutex<Session>>, args: &[BString]) {}
+
fn io(
&self,
session: Arc<Mutex<Session>>,