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

feat: support command filter on pueue status #560

Merged
merged 6 commits into from
Jul 31, 2024

Conversation

wesleyel
Copy link
Contributor

@wesleyel wesleyel commented Jul 27, 2024

impl #524

example:

pueue add -- ls /var

pueue status command%=ls
pueue status command=ls /var
pueue status command!=ls

I'm not sure if spaces require special handling. In the above example, the query statement seems works fine even without escaping.

Also, I would like to discuss that other than the existing OPs (eq:= neq:!= contains:%=), should we further implement the semantics of not contain?

Thanks!

Checklist

Please make sure the PR adheres to this project's standards:

  • I included a new entry to the CHANGELOG.md.
  • I checked cargo clippy and cargo fmt. The CI will fail otherwise anyway.
  • (If applicable) I added tests for this feature or adjusted existing tests.
  • (If applicable) I checked if anything in the wiki needs to be changed.

Copy link

github-actions bot commented Jul 30, 2024

Test Results

  3 files  ± 0   19 suites  ±0   3m 8s ⏱️ +7s
161 tests + 8  161 ✅ + 8  0 💤 ±0  0 ❌ ±0 
340 runs  +16  340 ✅ +16  0 💤 ±0  0 ❌ ±0 

Results for commit 91d25d3. ± Comparison against base commit d6fa9a6.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.34%. Comparing base (d6fa9a6) to head (91d25d3).

Files Patch % Lines
pueue/src/client/query/filters.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #560      +/-   ##
==========================================
+ Coverage   79.27%   79.34%   +0.07%     
==========================================
  Files          75       75              
  Lines        5664     5690      +26     
==========================================
+ Hits         4490     4515      +25     
- Misses       1174     1175       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@Nukesor Nukesor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a few change requests :)

pueue/tests/client/unit/status_query.rs Outdated Show resolved Hide resolved
pueue/tests/client/unit/status_query.rs Outdated Show resolved Hide resolved
pueue/tests/client/unit/status_query.rs Outdated Show resolved Hide resolved
pueue/tests/client/unit/status_query.rs Outdated Show resolved Hide resolved
@wesleyel
Copy link
Contributor Author

Thanks! All review fixed!

@Nukesor
Copy link
Owner

Nukesor commented Jul 31, 2024

Perfect, looks good to me :)
Thanks for the contribution :D

@Nukesor Nukesor merged commit 3e12a75 into Nukesor:main Jul 31, 2024
19 checks passed
@Nukesor Nukesor mentioned this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants