Package org.jline.reader
Interface ParsedLine
- All Known Subinterfaces:
CompletingParsedLine
- All Known Implementing Classes:
ArgumentCompleter.ArgumentLine
,Completers.RegexCompleter.ArgumentLine
,DefaultParser.ArgumentList
public interface ParsedLine
ParsedLine
objects are returned by the Parser
during completion or when accepting the line.
The instances should implement the CompletingParsedLine
interface so that escape chars and quotes can be correctly handled.- See Also:
-
Method Summary
-
Method Details
-
word
String word()The current word being completed. If the cursor is after the last word, an empty string is returned.- Returns:
- the word being completed or an empty string
-
wordCursor
int wordCursor()The cursor position within the current word.- Returns:
- the cursor position within the current word
-
wordIndex
int wordIndex()The index of the current word in the list of words.- Returns:
- the index of the current word in the list of words
-
words
The list of words.- Returns:
- the list of words
-
line
String line()The unparsed line.- Returns:
- the unparsed line
-
cursor
int cursor()The cursor position within the line.- Returns:
- the cursor position within the line
-