27 #define IASH_VERSION_MAJOR 0 28 #define IASH_VERSION_MINOR 5 29 #define IASH_VERSION_PATCH 0 35 #include "Environment.h" 36 #include "CommandDispatcher.h" 37 #include "Directory.h" 58 friend class ExitCommand;
67 iash(
const std::string &appName=
"iash");
127 template <
typename ExtCommand,
typename... Args>
176 int exec (std::string &cmd);
187 int run (std::istream& cmdin,
bool showPrompt=
false);
193 std::string m_appName;
void registerCommand(Command *cmd)
Registers a given Command with this CommandDispatcher instance.
Definition: CommandDispatcher.cpp:23
iash(const std::string &appName="iash")
Creates an iash shell object with the given application name (for use in the prompt).
Definition: iash.cpp:26
void addCommand(Command *cmd)
Adds a Command instance to this shell's CommandDispatcher registry.
Definition: iash.cpp:46
Represents a directory on the filesystem.
Definition: Directory.h:26
int runInteractive()
Runs the shell in interactive mode.
Definition: iash.cpp:51
Class to register and execute Commands in an iash shell.
Definition: CommandDispatcher.h:30
Environment * getEnv()
Gets the current Environment object for this shell instance.
Definition: iash.cpp:36
The main shell class for iash.
Definition: iash.h:56
int runScript(const char *fname)
Executes the commands in the specified script and quits.
Definition: iash.cpp:57
int exec(std::string &cmd)
Executes the specified command and quits.
Abstract interface for a command registered with the shell.
Definition: Command.h:56
Used to retain command arguments and the proper input and output streams for a command call...
Definition: UserCommand.h:28
void addCommand(Args &&... args)
Adds a Command instance of the given type to this shell's CommandDispatcher registry.
Definition: iash.h:128
Environment variable manager for iash.
Definition: Environment.h:33
const Directory * getCwd() const
Gets the current working directory for this shell.
Definition: iash.cpp:41