diff options
| author | Ákos Kőrösi <korakos99@gmail.com> | 2026-05-18 19:35:43 +0200 |
|---|---|---|
| committer | Ákos Kőrösi <korakos99@gmail.com> | 2026-05-18 19:35:43 +0200 |
| commit | 843d58e2ef3552093876af45c4cba963943d2551 (patch) | |
| tree | 4ca325a714c36e7e06b06ba738c03d403eb47c74 | |
| parent | d7d3843b8259b83f86dcdf93a138eb48060d74db (diff) | |
add readline history
| -rw-r--r-- | main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1,6 +1,7 @@ #include <stdlib.h> #include <stdio.h> #include <readline/readline.h> +#include <readline/history.h> #include <string.h> #include "exec.h" @@ -13,6 +14,7 @@ int main() { line = readline("$ "); if (line[0] == '\0') continue; if (strcmp(line, "exit") == 0) exit(0); + add_history(line); process_input_line(line, &shstate); } free(line); |
