From b9dbc01036285c8287c6a1d194b806777d0ef78f Mon Sep 17 00:00:00 2001 From: mattirn Date: Sat, 2 Jan 2021 12:24:28 +0100 Subject: [PATCH] Allow to set only bg color name in *_COLORS variable --- builtins/src/main/java/org/jline/builtins/Styles.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtins/src/main/java/org/jline/builtins/Styles.java b/builtins/src/main/java/org/jline/builtins/Styles.java index 95c8caab6..e73caa6f3 100644 --- a/builtins/src/main/java/org/jline/builtins/Styles.java +++ b/builtins/src/main/java/org/jline/builtins/Styles.java @@ -25,7 +25,7 @@ public class Styles { private static final String PRNT_COLORS = "PRNT_COLORS"; private static final String KEY = "([a-z]{2}|\\*\\.[a-zA-Z0-9]+)"; - private static final String VALUE = "[!~#]?[a-zA-Z0-9]+[a-z0-9-;]*"; + private static final String VALUE = "([!~#]?[a-zA-Z0-9]+[a-z0-9-;]*)?"; private static final String VALUES = VALUE + "(," + VALUE + ")*"; private static final String STYLE_PATTERN = KEY + "=" + VALUES + "(:" + KEY + "=" + VALUES + ")*(:|)";