Added readline support into CLI.

Supports scrolling through past commands,
and tab-completion for commands (no subcommands, sorry).
Requires libreadline package to build from now on!
for debian/ubuntu: apt-get install libreadline5-dev
Linux only, windows users shouldnt notice any difference.

--HG--
branch : trunk
This commit is contained in:
raczman
2009-06-08 20:19:13 +02:00
parent c7c092f54b
commit 5ae74c5b58
3 changed files with 75 additions and 18 deletions
+1 -3
View File
@@ -73,7 +73,7 @@ class ChatHandler
int ParseCommands(const char* text);
virtual char const* GetName() const;
static ChatCommand* getCommandTable();
protected:
explicit ChatHandler() : m_session(NULL) {} // for CLI subclass
@@ -89,8 +89,6 @@ class ChatHandler
bool ShowHelpForCommand(ChatCommand *table, const char* cmd);
bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd, char const* subcmd);
ChatCommand* getCommandTable();
bool HandleAccountCommand(const char* args);
bool HandleAccountCreateCommand(const char* args);
bool HandleAccountDeleteCommand(const char* args);