From 6e4ba7a86ff2ff0dc160e6d6a23453a367e7613b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 23 Mar 2026 09:01:27 +0200 Subject: fix random_quote_parse_entry: match non-space before colon, not any char --- fish/conf.d/taskwarrior.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fish/conf.d/taskwarrior.fish b/fish/conf.d/taskwarrior.fish index 3e1e9e7..1d0ba49 100644 --- a/fish/conf.d/taskwarrior.fish +++ b/fish/conf.d/taskwarrior.fish @@ -269,9 +269,9 @@ end # Parses a random-quote entry. If it matches "word: description", echoes project then description (one per line); otherwise echoes empty then entry. function _taskwarrior::random_quote_parse_entry set -l entry "$argv[1]" - if string match -q -r '^[^:]+: .+' -- $entry - echo (string lower -- (string trim -- (string replace -r '^([^:]+): (.+)$' '$1' -- $entry))) - echo (string replace -r '^([^:]+): (.+)$' '$2' -- $entry) + if string match -q -r '^\S+: .+' -- $entry + echo (string lower -- (string trim -- (string replace -r '^(\S+): (.+)$' '$1' -- $entry))) + echo (string replace -r '^(\S+): (.+)$' '$2' -- $entry) else echo "" echo $entry -- cgit v1.2.3