microsoft / vscode-github-issue-notebooks

GitHub Issues Notebooks for VS Code
MIT License
219 stars 25 forks source link

Feature request: parentheses to avoid duplicating and-clauses #63

Open danmoseley opened 4 years ago

danmoseley commented 4 years ago

Extension 0.0.36 VS Code 1.48.0-insider

It would be nice to do AND. For example, this works

$runtime=repo:dotnet/runtime
$runtime is:open label:area-System.Buffers OR is:open label:area-System.IO.Pipelines

it would be easier to write as

$runtime=repo:dotnet/runtime
$runtime is:open ( label:area-System.Buffers OR label:area-System.IO.Pipelines)

(possibly with an AND there)

I can't find a way to do that currently. With larger queries, the duplication could get unwieldy.

jrieken commented 4 years ago

(possibly with an AND there)

AND is the default, e.g $runtime is:open label:area-System.Buffers label:area-System.IO.Pipelines should do the job

danmoseley commented 4 years ago

Right, I meant an AND if it was useful clarity. My bad for not being clear.

I am looking for open AND (label: pipelines OR label:buffers) where the AND can remain implicit, or not.

RossBencina commented 1 year ago

I agree, this is a real problem, without parenthesis I don't think there is any way to express "(A or B) and (C or D)" or even "(A and B) or (C and D)"

For example how would I write the following as a single query:

$repo $milestone is:open (label:requirement or label:hygiene) // returns nothing

My workaround is to write multiple queries:

$repo $milestone is:open label:requirement $repo $milestone is:open label:hygiene

which is annoying when the logic is more complicated.