summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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);