#ifndef SHELL_H #define SHELL_H #include #include #include #include #include #include #include #include #include #include using std::string; using std::cin; using std::cout; using std::cerr; using std::string; using std::vector; using std::istringstream; using std::nullptr_t; class Shell { static bool undoingLine; Commands cmds; string ps; string name; void (*shellSetup)(Shell *); class IsUndoingLineException {}; int launch(vector* args); int execute(vector* args); static void EofHandler(int); string* read_line(); vector* split_line(string* line); public: Shell( string n="msh", string ps="MSH$",void (*s)(Shell*)=0); string getPs() const; void setPs(const string &value); string getName() const; void setName(const string &value); void loop(); //for in-shell commands void addCmd(Command *cmd); size_t howManyCmds(); }; #endif // SHELL_H