Hi Thomas,
> What is the correct behaviour for timewarrior if the user tries to unset
> a configuration defined by rules (e.g. reports.week.hours)?
There are built-in defaults for all settings. If there are no defaults for a setting then I have missed it, and it should be created. So I think there are defaults, but it could be that I missed some.
With an empty timewarrior.cfg file, the user should see all the default values in this command:
$ timew config
Any value in the timewarrior.cfg file will override a default. These overrides can be removed, but that just means the user reverts to the default. But using this command, it is possible to unset a value:
$ timew config <name> ‘'
Those are two single quotes. This should result in the timewarrior.cfg entry:
<name>=
This is how a built-in default is effectively “unset”. So the error you specified shouldn’t be needed. I think this indicates that there is no default.
P
> Currently timewarrior exits with 255 and the error message
>
> No entry named 'reports.week.hours' found.
>
> I think this is not quite right, because the value actually does exist.
> I would like to alter this by throwing an exception e.g. in
> CmdConfig.cpp:256 with a more explanatory message like
>
> Value '{1}' is internally defined and cannot be unset
>
> Comments?
>
> Regards,
> Thomas
>
>
> --
> Dr. Thomas Lauf *
thoma...@tngtech.com * +49 174 3180 086
> TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
> Geschäftsführer: Henrik Klagges, Christoph Stock, Dr. Robert Dahlke
> Sitz: Unterföhring * Amtsgericht München, HRB 135082
>
> --
> You received this message because you are subscribed to the Google Groups "taskwarrior-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
taskwarrior-d...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.