diff --git a/src/main.c b/src/main.c index e776132..3fc88cb 100644 --- a/src/main.c +++ b/src/main.c @@ -8,17 +8,20 @@ int main() { char *input_line; unsigned char exit_code = 0; + struct Args args; while (1) { + args.argc = 0; + printf("$ "); input_line = read_a_line(stdin); if (input_line == NULL) { return exit_code; + } else { + args = parse(input_line); + free(input_line); } - struct Args args = parse(input_line); - free(input_line); - if (args.argc > 0) { exit_code = invoke(args); }