26 #ifndef O2SCL_CLI_READLINE_H 27 #define O2SCL_CLI_READLINE_H 29 #include <readline/readline.h> 30 #include <readline/history.h> 32 #include <o2scl/cli.h> 34 #ifndef DOXYGEN_NO_O2NS 60 cli_readline(std::string fname=
".cli_hist",
size_t max_size=100) {
65 read_history(histfile.c_str());
69 stifle_history(((
int)msize));
70 write_history(histfile.c_str());
86 line_read=readline(c);
90 if (line_read && *line_read) {
91 add_history(line_read);
101 #ifndef DOXYGEN_NO_O2NS An extension to o2scl::cli which uses readline.
The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
Configurable command-line interface.
std::string histfile
String containing filename.
char * line_read
Buffer for readline.
virtual char * cli_gets(const char *c)
Function to get a string from the user.
size_t msize
Maximum history file size.