The input_model keeps track of what commands were executed before, and figures out what should be displayed when the user presses up / down arrows in the input. More...
Public Member Functions | |
input_model () | |
void | add_to_history (const std::string &str) |
void | maybe_update_prefix (const std::string &text) |
std::string | search (int direction) |
std::string | clear_history () |
std::string | list_history () |
bool | do_history_expansion (std::string &cmd) |
Private Attributes | |
std::string | prefix_ |
bool | end_of_history_ |
The input_model keeps track of what commands were executed before, and figures out what should be displayed when the user presses up / down arrows in the input.
It is essentially part of the model, but it isn't connected to the lua kernel so I have implemented it separately. Putatively it could all be refactored so that there is a single model with private subclass "lua_model" and also a "command_history_model" but I have decided simply to not implement it that way.
Definition at line 196 of file lua_interpreter.cpp.
|
inline |
Definition at line 205 of file lua_interpreter.cpp.
References filesystem::file_exists().
|
inline |
Definition at line 233 of file lua_interpreter.cpp.
References UNUSED.
|
inline |
Definition at line 303 of file lua_interpreter.cpp.
|
inline |
Definition at line 342 of file lua_interpreter.cpp.
References UNUSED.
|
inline |
Definition at line 313 of file lua_interpreter.cpp.
References i, and lexical_cast().
|
inline |
Definition at line 243 of file lua_interpreter.cpp.
References LOG_LUA.
|
inline |
Definition at line 253 of file lua_interpreter.cpp.
|
private |
Definition at line 199 of file lua_interpreter.cpp.
|
private |
Definition at line 198 of file lua_interpreter.cpp.