Less idiotic includes
[minishell-2.git] / Sources / main.cpp
bloba11c06d62b4da483d2d8495540cd84dfab307dc8
1 #include "Headers/opsys.h"
3 using std::cin;
4 using std::cout;
6 int main(int argc, char ** argv)
8 cout << "miniSHELL 2 -- github.com/vrmiguel/minishell2\n";
9 CLIInputs(argc, argv); // Process command-line arguments
10 Prompt prompt;
11 SignalHandler sighandler;
12 for(;;)
14 if (exit_program) return 0; // Tests for SIGINT/SIGHUP
15 string line;
16 prompt.print();
17 std::getline(cin, line);
18 if (exit_program) return 0; // Tests for "quit"
19 if (cin.eof())
21 cout << "\nEOF found. Exiting.\n";
22 return 0;
24 if(line.empty())
25 continue;
26 prompt.parse(line);
27 prompt.run();
29 return 0;