//--- // fxos-shell.shell: Top-level shell functions //--- #ifndef FXOS_SHELL_H #define FXOS_SHELL_H #include #include #include "session.h" #include "parser.h" /* Type of functions to be called as shell commands */ using ShellFunction = void (*)(Session &session, Parser &parser); /* Type of functions to complete arguments to shell commands */ using ShellCompleter = void (*)(Session &session, Parser &parser); /* Shell command. The constructor registers it automatically */ struct ShellCommand { ShellFunction function; ShellCompleter completer; std::string short_description; std::string long_description; ShellCommand(std::string name, ShellFunction function, ShellCompleter completer, std::string shortd, std::string longd); }; #endif /* FXOS_SHELL_H */