} conf_t;
conf_t parse_command_line(int argc, char *argv[]) {
- conf_t conf = {0};
+ conf_t conf;
+ conf.interactive = 0;
- if (argc == 2 && strcmp(argv[1], "-i") == 0 && isatty(2))
- conf.interactive = 1;
+ for (int i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-i") == 0 && isatty(2))
+ conf.interactive = 1;
+ }
return conf;
}