mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 03:15:06 -04:00
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:
parent
605ad09a3e
commit
6955976b2d
4 changed files with 76 additions and 18 deletions
|
@ -374,6 +374,9 @@ namespace epee
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_READLINE
|
||||
rdln::suspend_readline pause_readline;
|
||||
#endif
|
||||
std::cout << "unknown command: " << command << std::endl;
|
||||
std::cout << usage;
|
||||
}
|
||||
|
@ -477,6 +480,9 @@ namespace epee
|
|||
lookup::mapped_type & vt = m_command_handlers[cmd];
|
||||
vt.first = hndlr;
|
||||
vt.second = usage;
|
||||
#ifdef HAVE_READLINE
|
||||
rdln::readline_buffer::add_completion(cmd);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool process_command_vec(const std::vector<std::string>& cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue