aboutsummaryrefslogtreecommitdiff
path: root/foot.ini
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-02-03 12:56:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-02-05 12:35:17 +0000
commita984531ce57f30bc9ec7f664e7c2e8c77b3f439e (patch)
treec9533c6289d41e1b34e80bb003bf89ba6ffe4556 /foot.ini
parentconfig: remove debug logging (diff)
url-mode: use the first *sub* expression as URL
When auto-matching URLs (or custom regular expressions), use the first *subexpression* as URL, rather than the while regex match. This allows us to write custom regular expressions with prefix/suffix strings that should not be included in the presented match.
Diffstat (limited to 'foot.ini')
-rw-r--r--foot.ini2
1 files changed, 1 insertions, 1 deletions
diff --git a/foot.ini b/foot.ini
index 7514c02b..a9a790ac 100644
--- a/foot.ini
+++ b/foot.ini
@@ -69,7 +69,7 @@
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
-# regex=([a-z][[:alnum:]-]+:(/{1,3}|[a-z0-9%])|www[:digit:]{0,3}[.])([^[:space:](){}<>]+|\(([^[:space:](){}<>]+|(\([^[:space:](){}<>]+\)))*\)|\[([^]\[[:space:](){}<>]+|(\[[^]\[[:space:](){}<>]+\]))*\])+(\(([^[:space:](){}<>]+|(\([^[:space:](){}<>]+\)))*\)|\[([^]\[[:space:](){}<>]+|(\[[^]\[[:space:](){}<>]+\]))*\]|[^]\[[:space:]`!(){};:'".,<>?«»“”‘’])
+# regex=(([a-z][[:alnum:]-]+:(/{1,3}|[a-z0-9%])|www[:digit:]{0,3}[.])([^[:space:](){}<>]+|\(([^[:space:](){}<>]+|(\([^[:space:](){}<>]+\)))*\)|\[([^]\[[:space:](){}<>]+|(\[[^]\[[:space:](){}<>]+\]))*\])+(\(([^[:space:](){}<>]+|(\([^[:space:](){}<>]+\)))*\)|\[([^]\[[:space:](){}<>]+|(\[[^]\[[:space:](){}<>]+\]))*\]|[^]\[[:space:]`!(){};:'".,<>?«»“”‘’]))
# You can define your own regex's, by adding a section called
# 'regex:<ID>' with a 'regex' and 'launch' key. These can then be tied