Go to the documentation of this file.
18 #ifndef __BIN_SH_SHELL
19 #define __BIN_SH_SHELL
43 Shell(
int argc,
char **argv);
126 Size parse(
char *cmdline,
char **argv,
Size maxArgv,
bool *background);
virtual ~Shell()
Destructor.
virtual Result exec()
Execute the application.
HashTable< String, ShellCommand * > m_commands
All known ShellCommands.
void prompt() const
Output a prompt.
Builtin command for the Shell.
POSIX-compatible application.
System command shell interpreter.
int executeInput(const Size argc, const char **argv, const bool background)
Executes the given input.
void registerCommand(ShellCommand *command)
Register a new ShellCommand.
Shell(int argc, char **argv)
Constructor.
HashTable< String, ShellCommand * > & getCommands()
Get all shell commands.
unsigned int Size
Any sane size indicator cannot go negative.
Size parse(char *cmdline, char **argv, Size maxArgv, bool *background)
Parses an input string into separate pieces.
Result runInteractive()
Executes the Shell by entering an infinite loop.
char * getInput() const
Fetch a command text from standard input.
ShellCommand * getCommand(const char *name)
Get shell command.