fxos/shell/shell.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
792 B
C
Raw Permalink Normal View History

//---
// 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);
2022-03-06 17:15:13 +01:00
/* 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 */