diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 5e7d40a..7a8d864 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,6 +30,7 @@ pub mod serialization; use linebuf::LineBuf; use raw::*; +use crate::completion::PathCache; use crate::cursor::{Direction, move_cursor}; use crate::history::HistoryEntry; use crate::parse::{Ast, PreExpansion}; @@ -74,6 +75,7 @@ pub struct Session { vars: HashMap<BString, BString>, funs: HashMap<BString, Ast<PreExpansion>>, socket_running: Option<export_fun::SocketRunning>, + path_cache: PathCache, /// n before end of history.len() /// 0 == not checking history @@ -270,11 +272,14 @@ fn event_loop() { socket_running: None, vars: HashMap::new(), funs: HashMap::new(), + path_cache: Default::default(), }; print!("{}", se.prompt()); let session = Arc::new(Mutex::new(se)); + completion::populate_path_cache(session.clone()); + let _sock_dropper = export_fun::listen(session.clone()); loop { |
