diff options
| author | Jonas Maier <> | 2026-03-07 11:32:59 +0100 |
|---|---|---|
| committer | Jonas Maier <> | 2026-03-07 11:32:59 +0100 |
| commit | b3ea0f7580a41f0c7769ba610a6219a5fc7c9eb6 (patch) | |
| tree | 62a95cdc8e34272c59734a6869d9c9fab29d3d21 /src/run/mod.rs | |
| parent | 6d396041ed8c00f6ac58a1b90473ec7ea5db43d8 (diff) | |
| download | pish-b3ea0f7580a41f0c7769ba610a6219a5fc7c9eb6.tar.gz | |
fix reloading
Diffstat (limited to 'src/run/mod.rs')
| -rw-r--r-- | src/run/mod.rs | 6 |
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>>, |
