GothenburgBitFactory / timewarrior

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

Tags with special characters (e.g. `+`, `-`) do not apply tag coloring for `tags.<Tag>.color` #591

Open erik-schmidt opened 7 months ago

erik-schmidt commented 7 months ago

I want to color my tags by project and by use-case. For tags without any special characters this works, but once I have tags which contain special characters like + or - this is not working. I have projects which use the + sign and the - sign is used for tickets.

Here is the config (when running timew config):

color = on
confirmation = on
debug = off

define exclusions:
  friday = <8:30 12:00-13:00 >17:30
  monday = <8:30 12:00-13:00 >17:30
  saturday = >0:00
  sunday = >0:00
  thursday = <8:30 12:00-13:00 >17:30
  tuesday = <8:30 12:00-13:00 >17:30
  wednesday = <8:30 12:00-13:00 >17:30

journal:
  size = -1

define reports:
  day:
    axis = internal
    cell = 15
    day = yes
    holidays = no
    hours = all
    lines = 2
    month = no
    spacing = 1
    summary = yes
    totals = no
    week = no
    weekday = yes
  month:
    cell = 15
    day = yes
    holidays = yes
    hours = all
    lines = 1
    month = yes
    spacing = 1
    summary = yes
    totals = yes
    week = yes
    weekday = yes
  summary:
    annotations = yes
    holidays = yes
    ids = yes
  week:
    cell = 15
    day = yes
    holidays = yes
    hours = all
    lines = 1
    month = no
    spacing = 1
    summary = yes
    totals = yes
    week = yes
    weekday = yes

define tags:
  XL2:
    color = color09

define theme:
  colors:
    debug = blue
    exclusion = gray8 on gray4
    holiday = gray4
    ids = color13
    label = gray4
    today = rgb521
  description = dark.theme: A default, 256-color theme
  palette:
    color01 = white on red
    color02 = white on blue
    color03 = black on green
    color04 = black on magenta
    color05 = black on cyan
    color06 = black on yellow
    color07 = black on white
    color08 = white on bright red
    color09 = white on bright blue
    color10 = black on bright green
    color11 = black on bright magenta
    color12 = black on bright cyan
    color13 = black on bright yellow

verbose = on

And here is my timewarrior.cfg:

# Theme
import /opt/homebrew/Cellar/timewarrior/1.7.1/share/doc/timew/themes/dark.theme

define exclusions:
  monday = <8:30 12:00-13:00 >17:30
  tuesday = <8:30 12:00-13:00 >17:30
  wednesday = <8:30 12:00-13:00 >17:30
  thursday = <8:30 12:00-13:00 >17:30
  friday = <8:30 12:00-13:00 >17:30
  saturday = >0:00
  sunday = >0:00

reports.summary.ids = yes
reports.summary.annotations = yes
tags.XL2.color = color09
tags.SP+OC.color = color01

Is there any way to escape these kind of symbols or is it simply not working currently?