aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-07 12:43:38 +0100
committerJonas Maier <>2026-03-07 12:43:38 +0100
commit6504d8c244af90fad76d101406a47a1ac4b22e22 (patch)
treef6278d31dae618c9547e06bf3b19db3b57410169 /src/main.rs
parent1d4e2ae6f557082cae1d468ccd9cd0c2c873c0cc (diff)
downloadpish-6504d8c244af90fad76d101406a47a1ac4b22e22.tar.gz
can declare but not yet use variables
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 925c62c..1dd86bc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -25,6 +25,7 @@ use linebuf::LineBuf;
use raw::*;
use crate::cursor::{Direction, move_cursor};
+use crate::parse::{Ast, PreExpansion};
use crate::run::CommandDispatch;
macro_rules! print {
@@ -64,6 +65,7 @@ pub struct Session {
dispatch: CommandDispatch,
prev_path: BString,
vars: HashMap<BString, BString>,
+ funs: HashMap<BString, Ast<PreExpansion>>,
/// n before end of history.len()
/// 0 == not checking history
@@ -205,6 +207,7 @@ fn event_loop() {
prev_path: vec![b'.'],
history_visit: 0,
vars: HashMap::new(),
+ funs: HashMap::new(),
};
print!("{}", se.prompt());