Skip to content
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

(Also) Support task <filter> [<reportname>] export #3520

Open
m-gris opened this issue Jun 25, 2024 · 2 comments
Open

(Also) Support task <filter> [<reportname>] export #3520

m-gris opened this issue Jun 25, 2024 · 2 comments
Labels
good first issue Good for newcomers type:enhancement New feature or request

Comments

@m-gris
Copy link

m-gris commented Jun 25, 2024

This is a sequel to #2576 , which did introduce in a "nice improvement", by supporting task <filter> export [<reportname>].

However, the syntax feels, to me at least, a bit "un-intuitive".

task <filter> [<reportname>] export would probably feel more intuitive to many unix users, i.e sort-of "piping" the output of task <filter> [<reportname>] to export.

@tbabej
Copy link
Member

tbabej commented Nov 27, 2024

The proposed change would lead to ambiguous behaviour, as the name of the report can also be a valid plaintext filter query, i.e.:

task export blocked

exports all tasks according to the filter of the blocked report, while

task blocked export

exports all the tasks that have word "blocked" in their description. Both are valid use cases.

@tbabej
Copy link
Member

tbabej commented Nov 27, 2024

This issue does not complain about this, but I can see how that would lead to some amount of confusing behaviour. Perhaps what should be done is the following - if the description filter is a single word, matching a report name (like blocked), we should emit a warning footnote to remind users that syntax to refer to report filters is different.

$ task blocked export
[
]
The specified description one-word filter "blocked" is also a name of a report. Did you mean "task export blocked"?

That said, not a big fan of informational messages with task export, which is often used programmatically, at the very least this needs to be emitted on stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type:enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

3 participants