diff options
| author | Jonas Maier <> | 2026-03-07 15:42:50 +0100 |
|---|---|---|
| committer | Jonas Maier <> | 2026-03-07 15:42:50 +0100 |
| commit | 56a1548c9a10a2bfc6ddda0e0d28ae0087aa193f (patch) | |
| tree | 714b9e71de352430612a18960c2925b35d9319d8 /src/main.rs | |
| parent | a4c61ccccc5a83a8d9506d996fd695104ef14e2d (diff) | |
| download | pish-56a1548c9a10a2bfc6ddda0e0d28ae0087aa193f.tar.gz | |
reorganize towards function execution
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 1dd86bc..7223e26 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,6 @@ use raw::*; use crate::cursor::{Direction, move_cursor}; use crate::parse::{Ast, PreExpansion}; -use crate::run::CommandDispatch; macro_rules! print { ($($x:tt)*) => {{ @@ -62,8 +61,8 @@ pub struct Session { raw: ScopedRawMode, line: LineBuf, history: Vec<BString>, - dispatch: CommandDispatch, prev_path: BString, + builtins: HashMap<BString, &'static dyn run::Builtin>, vars: HashMap<BString, BString>, funs: HashMap<BString, Ast<PreExpansion>>, @@ -203,7 +202,7 @@ fn event_loop() { raw, line: LineBuf::new(), history: Vec::new(), - dispatch: CommandDispatch::new(), + builtins: run::builtin_map(), prev_path: vec![b'.'], history_visit: 0, vars: HashMap::new(), |
