GothenburgBitFactory / GothenburgBitFactory/taskwarrior

OR operator not working with task context define

Open
#3,833 4 comments 1 reaction 0 assignees View on GitHub
topic:context
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

```
$ task --version
3.4.1
```

Following example from:
https://taskwarrior.org/docs/context/

```
$ task context define work +work or +freelance

Are you sure you want to add 'context.work.read' with a value of '+work or +freelance'? (yes/no) yes

The filter '+work or +freelance' is not a valid modification string, because it contains contains the 'OR' operator.
As such, value for the write context cannot be set (context will not apply on task add / task log).

Please use 'task config context.work.write ' to set default attribute values for new tasks in this context manually.

Context 'work' defined (read only). Use 'task context work' to activate.
```
-------------------------------------------------------------------------------------

```
$ task context

Name Type Definition Active
learning read pro:PGPAIML no
write pro:PGPAIML no
personal read project:PERSONAL no
write project:PERSONAL no
training read project:TRAINING yes
write project:TRAINING yes
work read +work or +freelance no
write no

Use 'task context none' to unset the current context.
```

![Image](https://github.com/user-attachments/assets/bef2c114-2a3a-47ee-98d9-b50355eb604f)

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.