New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task by index not working outside of context #44
Comments
@dontlaugh this may be awkward to fix with the current filtering mechanism which sees a combined context and command line filters. Perhaps the solution is not only ignore the context when an ID is provided, but the rest of the query too. We should probably also throw an error if an ID is specified together with command line filters. |
I think you are right. I will try sketching out this solution:
|
Actually, it would be cleaner (and reasonable?) to validate the options passed to NewTaskSet, as well. I will try to do that. Update: After thinking about this, I think it's simpler to do this validation in func main, for now. The reason is that NewTaskSet does not have a way to differentiate between tags and project strings passed from context vs. command line. And I have a hunch that it would be good to keep those concerns separated. 🤔 |
We extract a function that sets the filtered attribute on tasks if the task ID matches IDs explicitly passed at the command line. Add a unit test for this logic. Refs naggie#44
We extract a function that sets the filtered attribute on tasks if the task ID matches IDs explicitly passed at the command line. Add a unit test for this logic. Refs naggie#44
We extract a function that sets the filtered attribute on tasks if the task ID matches IDs explicitly passed at the command line. Add a unit test for this logic. Return an error if IDs are passed in combination with other attributes Refs naggie#44
We extract a function that sets the filtered attribute on tasks if the task ID matches IDs explicitly passed at the command line. Add a unit test for this logic. Return an error if IDs are passed in combination with other attributes Refs naggie#44
thanks to @dontlaugh -- fixed by #62 |
The default command,
next
should ignore the context if a task is referenced to be viewed by ID, much like theedit
ornote
commands which work regardless of context if an ID is provided.The text was updated successfully, but these errors were encountered: