Skip to content

Commit

Permalink
Widgets: args() method parse in ParseContext.COMPLETE, fixes #460
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Nov 7, 2019
1 parent b2bb7b5 commit 2189b1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtins/src/main/java/org/jline/builtins/Widgets.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.jline.reader.Buffer;
import org.jline.reader.LineReader;
import org.jline.reader.LineReader.SuggestionType;
import org.jline.reader.Parser.ParseContext;
import org.jline.reader.Reference;
import org.jline.reader.Widget;
import org.jline.reader.impl.BufferImpl;
Expand Down Expand Up @@ -124,7 +125,7 @@ public void replaceBuffer(Buffer buffer) {
}

public List<String> args(String line) {
return reader.getParser().parse(line, 0).words();
return reader.getParser().parse(line, 0, ParseContext.COMPLETE).words();
}

public String prevChar() {
Expand Down

0 comments on commit 2189b1f

Please sign in to comment.