diff options
| author | Jonas Maier <> | 2026-03-05 13:34:03 +0100 |
|---|---|---|
| committer | Jonas Maier <> | 2026-03-05 13:34:03 +0100 |
| commit | d7026b8fe2dfbd9110cec73d543f0cfffe1cb977 (patch) | |
| tree | 6c324cf4d3bb48bf773b4bfee3aed1a0ddf09237 /src/main.rs | |
| parent | d19fa2c722943fe09c2001d4e9bc6c27acfdc9d3 (diff) | |
| download | pish-d7026b8fe2dfbd9110cec73d543f0cfffe1cb977.tar.gz | |
better handling of builtins
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 08c4528..ef269a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ use linebuf::LineBuf; use raw::*; use crate::cursor::{Direction, move_cursor}; +use crate::run::CommandDispatch; macro_rules! print { ($($x:tt)*) => {{ @@ -54,6 +55,7 @@ pub struct Session { raw: ScopedRawMode, line: LineBuf, history: Vec<BString>, + dispatch: CommandDispatch, } fn event_loop() { @@ -68,6 +70,7 @@ fn event_loop() { raw, line: LineBuf::new(), history: Vec::new(), + dispatch: CommandDispatch::new(), }; print!("{PROMPT}"); @@ -97,7 +100,7 @@ fn event_loop() { if !line.is_empty() { print!("\r\n"); se.history.push(line.clone()); - run::run(&se, line); + run::run(&mut se, line); } } |
