Skip to content

Commit

Permalink
Parser: fixed getCommand() method, step II
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Mar 10, 2020
1 parent 71e3564 commit 6e61b97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reader/src/main/java/org/jline/reader/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ default String getCommand(final String line) {
out = matcher.group(1);
} else {
out = line.trim().split("\\s+")[0];
if (out.contains("=") || !out.matches(REGEX_COMMAND)) {
if (!out.matches(REGEX_COMMAND)) {
out = "";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public String getCommand(final String line) {
out = matcher.group(commandGroup);
} else {
out = line.trim().split("\\s+")[0];
if (out.contains("=") || !out.matches(regexCommand)) {
if (!out.matches(regexCommand)) {
out = "";
}
}
Expand Down

0 comments on commit 6e61b97

Please sign in to comment.