Add various readline related fixes

- Add missing unbind key
- Fix colored messages
- Add command completion
- Preserve last command input
- Fix cursor position issues
- Fix trailing whitespace in commands
- Synchronize set_prompt
This commit is contained in:
Jethro Grassie
2017-07-07 15:40:32 -04:00
parent 605ad09a3e
commit 6955976b2d
4 changed files with 76 additions and 18 deletions

View File

@@ -65,8 +65,7 @@
#ifdef HAVE_READLINE
#include "readline_buffer.h"
#define PAUSE_READLINE() \
rdln::suspend_readline pause_readline; \
std::cout << std::endl
rdln::suspend_readline pause_readline;
#else
#define PAUSE_READLINE()
#endif
@@ -195,6 +194,7 @@ namespace
}
else
{
PAUSE_READLINE();
set_console_color(m_color, m_bright);
std::cout << m_oss.str();
reset_console_color();