aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
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];