class FileNameCompleter extends jline.console.completer.FileNameCompleter
A file name completer takes the buffer and issues a list of potential completions.
This completer tries to behave as similar as possible to bash's file name completion (using GNU readline) with the following exceptions:Type | Name and description |
---|---|
boolean |
escapeBackslash If the filename will be placed inside a single/double quoted String we must escape backslash when on e.g. |
boolean |
escapeSpaces Set false if e.g. the filename will be inside a String. |
boolean |
printSpaceAfterFullCompletion True for say, a command-line arg, false for instance inside a String. |
Constructor and description |
---|
FileNameCompleter(boolean printSpaceAfterFullCompletion, boolean escapeBackslash, boolean escapeSpaces) |
Type Params | Return Type | Name and description |
---|---|---|
|
int |
complete(String buffer, int cursor, List<CharSequence> candidates) |
|
protected int |
matchFiles(String buffer, String translated, File[] files, List<CharSequence> candidates) |
Methods inherited from class | Name |
---|---|
class jline.console.completer.FileNameCompleter |
jline.console.completer.FileNameCompleter#complete(java.lang.String, int, java.util.List), jline.console.completer.FileNameCompleter#wait(long, int), jline.console.completer.FileNameCompleter#wait(), jline.console.completer.FileNameCompleter#wait(long), jline.console.completer.FileNameCompleter#equals(java.lang.Object), jline.console.completer.FileNameCompleter#toString(), jline.console.completer.FileNameCompleter#hashCode(), jline.console.completer.FileNameCompleter#getClass(), jline.console.completer.FileNameCompleter#notify(), jline.console.completer.FileNameCompleter#notifyAll() |
If the filename will be placed inside a single/double quoted String we must escape backslash when on e.g. Windows.
Set false if e.g. the filename will be inside a String. Should not be true if quoteFilenamesWithSpaces is true.
True for say, a command-line arg, false for instance inside a String.
Copyright © 2003-2024 The Apache Software Foundation. All rights reserved.