fxos/shell/shell.h

24 lines
599 B
C++

//---
// fxos-shell.shell: Top-level shell functions
//---
#ifndef FXOS_SHELL_H
#define FXOS_SHELL_H
#include <utility>
#include <string>
#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);
/* Register a command in the shell */
void shell_register_command(std::string name, ShellFunction function,
ShellCompleter completer);
#endif /* FXOS_SHELL_H */