public abstract class FilenameTabCompleter extends Object implements CommandLineCompleter
| Constructor and Description |
|---|
FilenameTabCompleter(CommandContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
int |
complete(CommandContext ctx,
String buffer,
int cursor,
List<String> candidates) |
static String |
expand(String path) |
protected int |
getCandidates(String buffer,
List<String> candidates) |
protected int |
matchFiles(String buffer,
String translated,
File[] entries,
List<String> candidates)
Match the specified buffer to the array of entries and
enter the matches into the list of candidates.
|
static FilenameTabCompleter |
newCompleter(CommandContext ctx) |
String |
translatePath(String path)
Translate a path that has previously been unescaped and unquoted.
|
public FilenameTabCompleter(CommandContext ctx)
public static FilenameTabCompleter newCompleter(CommandContext ctx)
public String translatePath(String path)
path - The unquoted, unescaped path.protected int matchFiles(String buffer, String translated, File[] entries, List<String> candidates)
buffer - the untranslated buffertranslated - the buffer with common characters replacedentries - the list of files to matchcandidates - the list of candidates to populatepublic static String expand(String path) throws IOException
IOExceptionpublic int complete(CommandContext ctx, String buffer, int cursor, List<String> candidates)
complete in interface CommandLineCompleterCopyright © 2018 JBoss by Red Hat. All rights reserved.