Skip to content

Commit 9578418

Browse files
committed
SystemHighlighter: fix Repl demo shell command highlight
1 parent 4e18cc6 commit 9578418

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

console/src/main/java/org/jline/console/impl/SystemHighlighter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.nio.file.Path;
2626
import java.nio.file.Paths;
2727
import java.util.*;
28-
import java.util.regex.Pattern;
2928

3029
/**
3130
* Highlight command and language syntax using nanorc highlighter.
@@ -71,7 +70,8 @@ protected AttributedString systemHighlight(LineReader reader, String buffer) {
7170
out = new AttributedStringBuilder().append(buffer).toAttributedString();
7271
} else if (fileHighlight.contains(command)) {
7372
out = doFileHighlight(reader, buffer);
74-
} else if (systemRegistry.isCommandOrScript(command) || systemRegistry.isCommandAlias(command)) {
73+
} else if (systemRegistry.isCommandOrScript(command) || systemRegistry.isCommandAlias(command)
74+
|| command.startsWith("!")) {
7575
out = doCommandHighlight(buffer);
7676
} else if (langHighlighter != null) {
7777
out = langHighlighter.highlight(buffer);

0 commit comments

Comments
 (0)