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 candidates,
int pos) |
static void |
printCandidates(ConsoleReader reader,
Collection 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 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 candidates, boolean eagerNewlines) throws IOException
getAutoprintThreshhold
,
they prompt with aq warning.candidates
- the list of candidates to printIOException
Copyright © 2002–2020. All rights reserved.