public class CandidateListCompletionHandler extends Object implements CompletionHandler
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<CharSequence> candidates,
int pos) |
boolean |
getPrintSpaceAfterFullCompletion() |
boolean |
isStripAnsi() |
static void |
printCandidates(ConsoleReader reader,
Collection<CharSequence> candidates)
Print out the candidates.
|
static void |
setBuffer(ConsoleReader reader,
CharSequence value,
int offset) |
void |
setPrintSpaceAfterFullCompletion(boolean printSpaceAfterFullCompletion) |
void |
setStripAnsi(boolean stripAnsi) |
public boolean getPrintSpaceAfterFullCompletion()
public void setPrintSpaceAfterFullCompletion(boolean printSpaceAfterFullCompletion)
public boolean isStripAnsi()
public void setStripAnsi(boolean stripAnsi)
public boolean complete(ConsoleReader reader, List<CharSequence> candidates, int pos) throws IOException
complete
in interface CompletionHandler
IOException
public static void setBuffer(ConsoleReader reader, CharSequence value, int offset) throws IOException
IOException
public static void printCandidates(ConsoleReader reader, Collection<CharSequence> candidates) throws IOException
ConsoleReader.getAutoprintThreshold()
, they prompt with a warning.candidates
- the list of candidates to printIOException
Copyright © 2017. All Rights Reserved.