GothenburgBitFactory / GothenburgBitFactory/taskwarrior

Possible UDA values on validation error would be nice

Open
#2,871 1 comment 1 reaction 0 assignees View on GitHub
type:enhancement
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

Given:
```bash
[λ] /tmp/scratch >_ task --version
2.6.2
```
and
```bash
# .taskrc
uda.urgent.type=string
uda.urgent.label=Urgent
uda.urgent.values=T,F
```
when
```
task add tost urgency:ble
```
then
```
The 'urgency' attribute does not allow a value of 'ble'.
```

What I'd like to see are the possible values, so that I don't have to go back to `.taskrc`. For example I have defined an UDA called `netz` with possible values `T`, `F`, `Plan` and `Maybe`. Sometimes I'd put in `Prepare` instead of `Plan`. Brainfart. I could be reminded of possible correct values without a mental context switch. So the error message I'd love to see would be:

```
The 'urgency' attribute does not allow a value of 'ble'. Possible values: T, F.
```

Of course that'd only work for `string`, but maybe an example could be provided for other types (like a properly formed date). Whatever, I only care about string UDAs, since I don't use the other types yet.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.