jline
public class FileNameCompletor extends java.lang.Object implements Completor
This completor tries to behave as similar as possible to bash's file name completion (using GNU readline) with the following exceptions:
TODO
Constructor and Description |
---|
FileNameCompletor() |
Modifier and Type | Method and Description |
---|---|
int |
complete(java.lang.String buf,
int cursor,
java.util.List candidates)
Populates candidates with a list of possible
completions for the buffer.
|
int |
matchFiles(java.lang.String buffer,
java.lang.String translated,
java.io.File[] entries,
java.util.List candidates)
Match the specified buffer to the array of entries
and enter the matches into the list of candidates.
|
protected void |
sortFileNames(java.util.List fileNames) |
public int complete(java.lang.String buf, int cursor, java.util.List candidates)
Completor
List
before returning.protected void sortFileNames(java.util.List fileNames)
public int matchFiles(java.lang.String buffer, java.lang.String translated, java.io.File[] entries, java.util.List candidates)
buffer
- the untranslated buffertranslated
- the buffer with common characters replacedentries
- the list of files to matchcandidates
- the list of candidates to populate