APIdia Launch Partner
Top Description Constructors Methods
jdk.internal.org.jline.reader.impl.completer

public Class FileNameCompleter

extends Object
implements Completer
Class Inheritance
All Implemented Interfaces
jdk.internal.org.jline.reader.Completer
Annotations
@Deprecated
Imports
java.io.IOException, java.nio.file.DirectoryStream, .Files, .Path, .Paths, java.util.List, jdk.internal.org.jline.reader.Candidate, .Completer, .LineReader, .LineReader.Option, .ParsedLine, jdk.internal.org.jline.terminal.Terminal, jdk.internal.org.jline.utils.AttributedStringBuilder, .AttributedStyle

Deprecated

use org.jline.builtins.Completers$FileNameCompleter instead

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:

Authors
Marc Prud'hommeaux, Jason Dillon
Since
2.3

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
accept(Path path)

public void
complete(LineReader reader, ParsedLine commandLine, final List<Candidate> candidates)

Implements jdk.internal.org.jline.reader.Completer.complete.

Populates candidates with a list of possible completions for the command line.

protected String
getDisplay(Terminal terminal, Path p)

protected Path
protected Path
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FileNameCompleterback to summary
public FileNameCompleter()

Method Detail

acceptback to summary
protected boolean accept(Path path)
completeback to summary
public void complete(LineReader reader, ParsedLine commandLine, final List<Candidate> candidates)

Implements jdk.internal.org.jline.reader.Completer.complete.

Doc from jdk.internal.org.jline.reader.Completer.complete.

Populates candidates with a list of possible completions for the command line. The list of candidates will be sorted and filtered by the LineReader, so that the list of candidates displayed to the user will usually be smaller than the list given by the completer. Thus it is not necessary for the completer to do any matching based on the current buffer. On the contrary, in order for the typo matcher to work, all possible candidates for the word being completed should be returned.

getDisplayback to summary
protected String getDisplay(Terminal terminal, Path p)
getUserDirback to summary
protected Path getUserDir()
getUserHomeback to summary
protected Path getUserHome()