diff options
| author | Ákos Kőrösi <korakos99@gmail.com> | 2026-05-19 21:13:19 +0200 |
|---|---|---|
| committer | Ákos Kőrösi <korakos99@gmail.com> | 2026-05-19 21:13:19 +0200 |
| commit | 2bdbf387261285d07e4b62d1e23c9e43efb14604 (patch) | |
| tree | 92b81d300f3c17d072f2a30362dafd815e57a758 /main.c | |
| parent | 6a391a1180766ac5717c40efa70d46cacca83f91 (diff) | |
restructure dir, create makefile
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -1,23 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <readline/readline.h> -#include <readline/history.h> -#include <string.h> - -#include "exec.h" - - -int main() { - char* line; - ShellState shstate = {.shell_vars = make_KeyValMap(1), .aliases = make_KeyValMap(1)}; - while (1) { - line = readline("$ "); - if (line[0] == '\0') continue; - if (strcmp(line, "exit") == 0) exit(0); - add_history(line); - process_input_line(line, &shstate); - } - free(line); -} - - |
