GothenburgBitFactory / timewarrior

Timewarrior - Commandline Time Tracking and Reporting
https://timewarrior.net
MIT License
1.2k stars 91 forks source link

Fix quoting of tags in DOM output #576

Closed lauft closed 6 months ago

lauft commented 6 months ago

The output of timew dom.tracked.tags should quote tags if necessary.

However it seems that the first item in the tag list never gets quoted. E.g.

$ timew start "a space" "b space" "c space" 1h ago
...
Tracking "a space" "b space" "c space"
...
$ timew stop
Recorded "a space" "b space" "c space"
...
$ timew get dom.tracked.tags
a space "b space" "c space"  # <-- tag 'a space' is not quoted

Also, when tags contain a hyphen, they get quoted as well in the output.

$ timew start "a-space" "b-space" "c-space" 1h ago
...
Tracking "a-space" "b-space" "c-space"
$ timew stop
Recorded "a-space" "b-space" "c-space"
$ timew get dom.tracked.tags
a-space "b-space" "c-space"

However this is not necessary, and it interferes with the tag completion script.