diff options
| author | Jonas Maier <> | 2026-03-11 12:30:07 +0100 |
|---|---|---|
| committer | Jonas Maier <> | 2026-03-11 12:30:07 +0100 |
| commit | 15501132916dfbc24f23b619e6d5408f258fc0d9 (patch) | |
| tree | a77e27bfc139415baf7faf09eeaefec360db9423 /src/main.rs | |
| parent | b881eec59118bc630b64378476f4d5ada2bf5968 (diff) | |
| download | pish-15501132916dfbc24f23b619e6d5408f258fc0d9.tar.gz | |
can wait for threads & processes with a timeout now
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 897cdb9..a7138f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ use std::time::Duration; pub mod basedir; pub mod completion; +pub mod ctrlc; pub mod cursor; pub mod date; pub mod defer; @@ -27,11 +28,13 @@ pub mod raw; pub mod reload; pub mod run; pub mod serialization; +pub mod wait; use linebuf::LineBuf; use raw::*; use crate::completion::PathCache; +use crate::ctrlc::CtrlC; use crate::cursor::{Direction, move_cursor}; use crate::history::HistoryEntry; use crate::parse::{Ast, PreExpansion}; @@ -82,6 +85,7 @@ pub struct Session { funs: HashMap<BString, Ast<PreExpansion>>, socket_running: Option<export_fun::SocketRunning>, path_cache: PathCache, + ctrlc: CtrlC, /// n before end of history.len() /// 0 == not checking history @@ -278,6 +282,7 @@ fn event_loop() { vars: HashMap::new(), funs: HashMap::new(), path_cache: Default::default(), + ctrlc: Default::default(), }; print!("{}", se.prompt()); @@ -286,6 +291,7 @@ fn event_loop() { completion::populate_path_cache(session.clone()); let _sock_dropper = export_fun::listen(session.clone()); + let _ctrlc = ctrlc::setup(session.clone()); loop { let mut buf = [0u8; 1]; |
