Skip to content

Commit

Permalink
Adjusted help highlight patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Sep 20, 2019
1 parent ff1f07a commit a479daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtins/src/main/java/org/jline/builtins/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,13 @@ public static AttributedString highlight(String msg, StyleResolver resolver) {
asyntax.styleMatches(Pattern.compile("(?:\\[|\\s|=)([A-Za-z]+[A-Za-z_-]*){1}\\b"),
Collections.singletonList(resolver.resolve(".ar")));
// option
asyntax.styleMatches(Pattern.compile("(?:\\s|\\[)(-\\?|[-]{1,2}[A-Za-z-]+\\b){1}"),
asyntax.styleMatches(Pattern.compile("(?:\\s|\\[)(-\\$|-\\?|[-]{1,2}[A-Za-z-]+\\b){1}"),
Collections.singletonList(resolver.resolve(".op")));
asb.append(asyntax);

AttributedStringBuilder acomment = new AttributedStringBuilder().append(comment);
// option
acomment.styleMatches(Pattern.compile("(?:\\s|\\[)(-\\?|[-]{1,2}[A-Za-z-]+\\b){1}"),
acomment.styleMatches(Pattern.compile("(?:\\s|\\[)(-\\$|-\\?|[-]{1,2}[A-Za-z-]+\\b){1}"),
Collections.singletonList(resolver.resolve(".op")));
// argument in comment
acomment.styleMatches(Pattern.compile("(?:\\s)([a-z]+[-]+[a-z]+|[A-Z_]{2,}){1}(?:\\s)"),
Expand Down

0 comments on commit a479daf

Please sign in to comment.