diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-23 09:01:27 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-23 09:01:27 +0200 |
| commit | 6e4ba7a86ff2ff0dc160e6d6a23453a367e7613b (patch) | |
| tree | 8baeabce6d0fa4e30515295224abb3ad3fdb80fb /fish | |
| parent | 3e4c2f3f9fed20a39b87a83cca90e8f82526d830 (diff) | |
fix random_quote_parse_entry: match non-space before colon, not any char
Diffstat (limited to 'fish')
| -rw-r--r-- | fish/conf.d/taskwarrior.fish | 6 |
1 files 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 |
