public class ArgumentCompleter extends Object implements Completer
Completer implementation that invokes a child completer using the appropriate separator argument.
This can be used instead of the individual completers having to know about argument parsing semantics.| Modifier and Type | Class and Description |
|---|---|
static class |
ArgumentCompleter.ArgumentLine |
| Constructor and Description |
|---|
ArgumentCompleter(Collection<Completer> completers)
Create a new completer.
|
ArgumentCompleter(Completer... completers)
Create a new completer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete(LineReader reader,
ParsedLine line,
List<Candidate> candidates)
Populates candidates with a list of possible completions for the buffer.
|
List<Completer> |
getCompleters() |
boolean |
isStrict()
Returns whether a completion at argument index N will success
if all the completions from arguments 0-(N-1) also succeed.
|
void |
setStrict(boolean strict)
If true, a completion at argument index N will only succeed
if all the completions from 0-(N-1) also succeed.
|
public ArgumentCompleter(Collection<Completer> completers)
completers - The embedded completerspublic ArgumentCompleter(Completer... completers)
completers - The embedded completerspublic void setStrict(boolean strict)
public boolean isStrict()
public void complete(LineReader reader, ParsedLine line, List<Candidate> candidates)
CompleterCopyright © 2017. All rights reserved.