summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorÁkos Kőrösi <korakos99@gmail.com>2026-05-21 19:11:09 +0200
committerÁkos Kőrösi <korakos99@gmail.com>2026-05-21 19:11:09 +0200
commit7d2348ece9b72cecd4d5417a4e39ee705c349e0a (patch)
treea2df777b505fa179e94d8787cf40abd582ecf56f /src/main.c
parentc7115f26c54eeb436e5d8199814c51055eec707d (diff)
start building for dollar expansions
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index dc451f9..1f9198b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,9 +6,11 @@
#include "syntax.h"
#include "stages.h"
+#include "utils.h"
int main() {
+ ShellState shstate = {.shell_vars = make_KeyValMap(256), .aliases = make_KeyValMap(256)};
char* line;
while (1) {
line = readline("$ ");
@@ -16,7 +18,7 @@ int main() {
if (strcmp(line, "exit") == 0) exit(0);
add_history(line);
Ast ast = lex(line);
- PipelineTree pltree = process_ast(ast);
+ PipelineTree pltree = process_ast(ast, &shstate);
execute_pipeline_tree(pltree);
}
free(line);