aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-07-03 12:22:03 +0200
committerRiccardo Spagni <ric@spagni.net>2017-07-03 12:22:03 +0200
commit40dc53c6e2f2e34c931f0993788920b77dbdfea2 (patch)
tree6768f4f1ff0e2904c9c86cfe06a58c4d531f0612 /contrib/epee/include
parentMerge pull request #2128 (diff)
parentAdd readline improvements (diff)
downloadmonero-40dc53c6e2f2e34c931f0993788920b77dbdfea2.tar.xz
Merge pull request #2098
fdccf7e6 Add readline improvements (Jethro Grassie)
Diffstat (limited to 'contrib/epee/include')
-rw-r--r--contrib/epee/include/console_handler.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/epee/include/console_handler.h b/contrib/epee/include/console_handler.h
index bb20faa65..6832f2ea1 100644
--- a/contrib/epee/include/console_handler.h
+++ b/contrib/epee/include/console_handler.h
@@ -315,7 +315,11 @@ namespace epee
if (!m_prompt.empty())
{
#ifdef HAVE_READLINE
- m_stdin_reader.get_readline_buffer().set_prompt(m_prompt);
+ std::string color_prompt = "\001\033[1;33m\002" + m_prompt;
+ if (' ' != m_prompt.back())
+ color_prompt += " ";
+ color_prompt += "\001\033[0m\002";
+ m_stdin_reader.get_readline_buffer().set_prompt(color_prompt);
#else
epee::set_console_color(epee::console_color_yellow, true);
std::cout << m_prompt;