public class CandidateListCompletionHandler extends Object implements CompletionHandler
A CompletionHandler
that deals with multiple distinct completions by
outputting the complete list of possibilities to the console. This mimics the
behavior of the readline library.
Constructor and Description |
---|
CandidateListCompletionHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
complete(ConsoleReader reader,
List<String> candidates,
int pos) |
static void |
printCandidates(ConsoleReader reader,
Collection<String> candidates,
boolean eagerNewlines)
Print out the candidates.
|
void |
setAlwaysIncludeNewline(boolean eagerNewlines) |
static void |
setBuffer(ConsoleReader reader,
String value,
int offset) |
public void setAlwaysIncludeNewline(boolean eagerNewlines)
public boolean complete(ConsoleReader reader, List<String> candidates, int pos) throws IOException
complete
in interface CompletionHandler
IOException
public static void setBuffer(ConsoleReader reader, String value, int offset) throws IOException
IOException
public static final void printCandidates(ConsoleReader reader, Collection<String> candidates, boolean eagerNewlines) throws IOException
getAutoprintThreshhold
, they prompt with aq warning.candidates
- the list of candidates to printIOException
Copyright © 2024. All rights reserved.