From 8e3d5784a3e7077e2703bede9c40761e8f8221b8 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Sun, 1 Dec 2024 16:35:57 +0000 Subject: [PATCH] docs: simplify description of shell wildcard patterns ...to align with glob(7) language Reported-by: @vyivel --- docs/labwc-config.5.scd | 5 +++-- docs/rc.xml.all | 5 +++-- include/common/match.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index 878ab60b..aabfb8ab 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -999,8 +999,9 @@ sandboxAppId="" type="" matchOnce="">* Define a window rule for any window which matches the criteria defined by the attributes *identifier*, *title*, or *type*. If more than one is defined, AND logic is used, so all have to match. - Matching against patterns with '\*' (wildcard) and '?' (joker) is - supported. Pattern matching is case-insensitive. + Matching is case-insensitive and is performed using shell wildcard + patterns (see glob(7)) so '\*' (not between brackets) matches any string + and '?' matches any single character. *identifier* relates to app_id for native Wayland windows and WM_CLASS for XWayland clients. diff --git a/docs/rc.xml.all b/docs/rc.xml.all index addb03d4..ae66fe4c 100644 --- a/docs/rc.xml.all +++ b/docs/rc.xml.all @@ -631,8 +631,9 @@ # - Criteria can also contain `matchOnce="true"` meaning that the rule # must only apply to the first instance of the window with that # particular 'identifier' or 'title'. - # - Matching against patterns with '*' (wildcard) and '?' (joker) is - # supported. Pattern matching is case-insensitive. + # - Matching is case-insensitive and is performed using shell wildcard + # patterns (see glob(7)) so '\*' (not between brackets) matches any string + # and '?' matches any single character. diff --git a/include/common/match.h b/include/common/match.h index 477f1ade..294319c7 100644 --- a/include/common/match.h +++ b/include/common/match.h @@ -5,7 +5,7 @@ #include /** - * match_glob() - Pattern match using '*' wildcards and '?' jokers. + * match_glob() - Pattern match using shell wildcard rules (see glob(7)) * @pattern: Pattern to match against. * @string: String to search. * Note: Comparison case-insensitive. -- 2.52.0