8 #include <readline/readline.h>
9 #include <readline/history.h>
10 #include <readline/tilde.h>
12 ReadLine::ReadLine(const String
& historyFile
)
13 : m_historyPath(copyAndFree(tilde_expand(historyFile
.c_str())))
15 read_history(m_historyPath
.c_str());
22 bool ReadLine::get(const String
& prompt
, String
& out
)
24 char *line
= readline(prompt
.c_str());
28 add_history(line
); // Add input to in-memory history
29 append_history(1, m_historyPath
.c_str());