Skip to content

Conversation

@Saphereye
Copy link
Contributor

@Saphereye Saphereye commented Jan 4, 2026

Description

This PR adds the following features

  • Ability to use != in search query
  • Using MB, mb, GB, gb, etc. while querying on t.read and t.write
  • Using time formatting to query on Time column (e.g time > 2h3m)

Issue

Closes: #1912

Testing

  • Windows
  • macOS (specify version below)
  • Linux (specify distro below)
  • Other (specify below)

Distro: Arch Linux (kernel: 6.18.2-arch2-1)

Checklist

  • If this is a code change, areas your change affects have been linted using (cargo fmt)
  • If this is a code change, your changes pass cargo clippy --all -- -D warnings
  • If this is a code change, new tests were added if relevant
  • If this is a code change, your changes pass cargo test
  • The change has been tested to work (see above) and doesn't appear to break other things
  • Documentation has been updated if needed (README.md, help menu, docs, configs, etc.)
  • There are no merge conflicts
  • You have reviewed the changes first
  • The pull request passes the provided CI pipeline

Other

I was wondering whether we could refactor the query component to use a lexer+parser architecture. This should make the query language easier to extend in the future.

Edit: Sorry, I hadn’t seen that @80avin wanted to work on the parser (issue #1897). Can I add these features for now if the parser is WIP?

added more prefixes for searches

fmt

clippy

clippy2
@ClementTsang ClementTsang self-assigned this Jan 4, 2026
@codecov
Copy link

codecov bot commented Jan 4, 2026

Codecov Report

❌ Patch coverage is 50.17182% with 145 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.90%. Comparing base (72db123) to head (c0244fa).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/widgets/process_table/query/prefix.rs 46.72% 130 Missing ⚠️
src/widgets/process_table/query.rs 71.87% 9 Missing ⚠️
src/widgets/process_table/query/or.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1948      +/-   ##
==========================================
- Coverage   54.00%   53.90%   -0.10%     
==========================================
  Files         120      119       -1     
  Lines       16565    16701     +136     
==========================================
+ Hits         8946     9003      +57     
- Misses       7619     7698      +79     
Flag Coverage Δ
macos-14 46.63% <50.17%> (-0.05%) ⬇️
ubuntu-latest 52.32% <50.17%> (-0.09%) ⬇️
windows-2022 46.20% <50.87%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ClementTsang
Copy link
Owner

I think adding these features now is fine.

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.

Support not in searching

2 participants