summaryrefslogtreecommitdiff
path: root/src/command_manager.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_manager.hh')
-rw-r--r--src/command_manager.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh
index 4a326613..55d62921 100644
--- a/src/command_manager.hh
+++ b/src/command_manager.hh
@@ -8,6 +8,7 @@
#include "shell_manager.hh"
#include "parameters_parser.hh"
#include "string.hh"
+#include "optional.hh"
#include "utils.hh"
#include "unordered_map.hh"
@@ -38,7 +39,7 @@ enum class CommandFlags
template<> struct WithBitOps<CommandFlags> : std::true_type {};
-using CommandInfo = std::pair<String, String>;
+struct CommandInfo { String name, info; };
struct Token
{
@@ -91,8 +92,8 @@ public:
CommandParameters params,
size_t token_to_complete, ByteCount pos_in_token);
- CommandInfo command_info(const Context& context,
- StringView command_line) const;
+ Optional<CommandInfo> command_info(const Context& context,
+ StringView command_line) const;
bool command_defined(const String& command_name) const;