Add regex filtering support (Fixes #554)#882
Conversation
d0942a3 to
172e252
Compare
|
Hi @dalance Following are the changes Added new CLI search mode flags in opt.rs: --text, --regex, and --smart (mutually exclusive). Kept existing text/numeric search logic unchanged, and added a separate regex path in view.rs so regex is only used when regex mode is active. Added smart regex detection in util.rs (has_regex_syntax) to auto-switch behavior in --smart mode when regex-like symbols are present. Added argument validation in main.rs: --regex accepts only one pattern argument. Updated dependency placement in Cargo.toml: moved regex to top-level [dependencies] so builds work on macOS/Linux/Windows (not only Linux/Android). The CI checks appear to be waiting for workflow approval. Thank you! |
172e252 to
2b317b7
Compare
|
Hi @dalance, rebased on the latest upstream/master and pushed the updated branch. CI is green now, and the earlier FreeBSD failure appears to have been transient; the 3rd rerun passed. Ready for re-review. |
|
Thank you for your contribution! |
|
Hi @dalance, I replaced the raw ASCII key codes in watch mode with named constants for Enter, Esc, and Backspace/Delete in watcher.rs. Behavior is unchanged, but the code should be clearer now. If this looks good, I can merge this update into the PR. |
|
I can't see your file? but it probably no problem. Please update the PR. |
Added --text, --regex, --smart
Regex filtering path in View::filter
Interactive regex edit in watch mode (/, Enter, Esc)
regex moved to top-level dependencies for cross-platform build compatibility.