-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
help wantedfeel free to contributefeel free to contribute
Description
It seems that it's not possible to unset the --active-tasks filter.
My use-case is that I don't need this filter as I mostly use taskopen with (UU)IDs retrieved from taskwarrior beforehand, so I just want to target that ID specifically, regardless of the task's state.
I've tried a few variations in the taskopenrc config file, and none of them seemed to work:
[General]
# These silently does nothing, e.g. running `taskopen --debug 11` just prints "No actions applicable"
# `taskopen diagnostics` prints out an error:
# parsejson.nim(518) raiseParseErr
# Error: unhandled exception: (1, 0) Error: { expected [JsonParsingError]
--active-tasks = ""
--active-tasks
# These throw an error in normal usage (as expected, I think that this is not valid .ini file syntax):
# ~/.config/taskopen/taskopenrc(13, 9) Error: invalid token: =
# Invalid config option in [General]: /opt/homebrew/Cellar/taskopen/2.0.2/share/taskopen/scripts:
--active-tasks =
--active-tasks :In the end, my workaround was to specify status.any: as the filter:
[General]
--active-tasks = "status.any:" # Note the trailing ':', it's required as per the TW syntax!This way, I am redundantly "filtering" for "any state", but at least it works as expected ✅
My assumption is that taskopen expects this value to always be set, and the strange behaviour when it's unset via the config may reflect that.
taskopen diagnostics dump (slightly redacted):
$ taskopen diagnostics
Environment
Platform: Mac OSX
Taskopen: 2.0.2
Taskwarrior: 3.4.1
Configuration: ~/.config/taskopen/taskopenrc
Current configuration
Binaries and paths:
taskbin = task
taskargs =
editor = vim
path_ext = /opt/homebrew/Cellar/taskopen/2.0.2/share/taskopen/scripts
General:
debug = false
no_annotation_hook = addnote $ID
task_attributes = priority,project,tags,description
Action groups:
Subcommands:
default = normal
Actions:
files
.target = annotations
.regex = ^[\.\/~]+.*\.(.*)
.labelregex = .*
.command = open $FILE
.modes = batch,any,normal
notes
.target = annotations
.regex = Notes
.labelregex = .*
.command = $EDITOR ~/tasknotes/$UUID.md
.modes = batch,any,normal
url
.target = annotations
.regex = ((?:www|http).*)
.labelregex = .*
.command = open $LAST_MATCH
.modes = batch,any,normal
Metadata
Metadata
Assignees
Labels
help wantedfeel free to contributefeel free to contribute