diff options
author | rebecca “wiggles” turner <rbt@sent.as> | 2024-09-17 16:36:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-09-17 16:36:34 +0000 |
commit | 8ab5743904a06c78153281bf61b3aa8aa451a489 (patch) | |
tree | 836534a073094d387e04b86bff411fdd8d726c74 /src/libcmd | |
parent | 80202e3ca314c21547c48f3a23d3f629cd9ddb87 (diff) | |
parent | 7ae0409989187d44044c4cd6f274f0a02ec5f826 (diff) |
Merge "Remove readline support" into main
Diffstat (limited to 'src/libcmd')
-rw-r--r-- | src/libcmd/repl-interacter.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/libcmd/repl-interacter.cc b/src/libcmd/repl-interacter.cc index 6979e3db4..459b048f4 100644 --- a/src/libcmd/repl-interacter.cc +++ b/src/libcmd/repl-interacter.cc @@ -8,10 +8,6 @@ #include <string_view> #include <cerrno> -#ifdef READLINE -#include <readline/history.h> -#include <readline/readline.h> -#else // editline < 1.15.2 don't wrap their API for C++ usage // (added in https://github.com/troglobit/editline/commit/91398ceb3427b730995357e9d120539fb9bb7461). // This results in linker errors due to to name-mangling of editline C symbols. @@ -20,7 +16,6 @@ extern "C" { #include <editline.h> } -#endif #include "finally.hh" #include "repl-interacter.hh" @@ -115,17 +110,13 @@ ReadlineLikeInteracter::Guard ReadlineLikeInteracter::init(detail::ReplCompleter } catch (SysError & e) { logWarning(e.info()); } -#ifndef READLINE el_hist_size = 1000; -#endif read_history(historyFile.c_str()); auto oldRepl = curRepl; curRepl = repl; Guard restoreRepl([oldRepl] { curRepl = oldRepl; }); -#ifndef READLINE rl_set_complete_func(completionCallback); rl_set_list_possib_func(listPossibleCallback); -#endif return restoreRepl; } |