aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-07 12:36:03 +0100
committerJonas Maier <>2026-03-07 12:36:03 +0100
commit1d4e2ae6f557082cae1d468ccd9cd0c2c873c0cc (patch)
tree456ab245e4d51b4d85ec5aac3001c241adb53b9c /src/main.rs
parentf87cb13a99fa041c3065a74ea1eab4c0a963cd7d (diff)
downloadpish-1d4e2ae6f557082cae1d468ccd9cd0c2c873c0cc.tar.gz
variable assignments
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 efcbd3c..925c62c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,4 @@
+use std::collections::HashMap;
use std::ffi::OsStr;
use std::fs;
use std::io::{self, IsTerminal, Read, Write};
@@ -62,6 +63,7 @@ pub struct Session {
history: Vec<BString>,
dispatch: CommandDispatch,
prev_path: BString,
+ vars: HashMap<BString, BString>,
/// n before end of history.len()
/// 0 == not checking history
@@ -202,6 +204,7 @@ fn event_loop() {
dispatch: CommandDispatch::new(),
prev_path: vec![b'.'],
history_visit: 0,
+ vars: HashMap::new(),
};
print!("{}", se.prompt());