Skip to content

Commit

Permalink
libcmd: do not compile editline helpers when building w/ readline
Browse files Browse the repository at this point in the history
The internal "completionCallback" and "listPossibleCallback" helpers
are used only when building with editline; hence, do not build then
when using readline, matching their usage in
"ReadlineLikeInteracter::init()".
  • Loading branch information
pinotree committed Jul 28, 2024
1 parent 9f1e73e commit e0198c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcmd/repl-interacter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ void sigintHandler(int signo)

static detail::ReplCompleterMixin * curRepl; // ugly

#ifndef USE_READLINE
static char * completionCallback(char * s, int * match)
{
auto possible = curRepl->completePrefix(s);
Expand Down Expand Up @@ -101,6 +102,7 @@ static int listPossibleCallback(char * s, char *** avp)

return ac;
}
#endif

ReadlineLikeInteracter::Guard ReadlineLikeInteracter::init(detail::ReplCompleterMixin * repl)
{
Expand Down

0 comments on commit e0198c5

Please sign in to comment.