From d17bed9b80183bb80ae560200d08bacfaac679c2 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 23 Dec 2016 16:23:31 +0000 Subject: Display the command prompt in error face when the command is not found Fixes #1021 --- src/command_manager.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/command_manager.hh') 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 : std::true_type {}; -using CommandInfo = std::pair; +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 command_info(const Context& context, + StringView command_line) const; bool command_defined(const String& command_name) const; -- cgit v1.2.3