Skip to content

#15 Add grep subcommand#27

Merged
gintsgints merged 4 commits into
mainfrom
15-add-grep-sub-command-to-rust-impl-as-well
Jun 14, 2026
Merged

#15 Add grep subcommand#27
gintsgints merged 4 commits into
mainfrom
15-add-grep-sub-command-to-rust-impl-as-well

Conversation

@gintsgints

Copy link
Copy Markdown
Collaborator

No description provided.

@gintsgints gintsgints linked an issue Feb 21, 2026 that may be closed by this pull request
@gintsgints gintsgints requested a review from kmoppel February 21, 2026 06:29

@kmoppel kmoppel left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Two comments:

  1. Search should be case-insenstive

./pgweasel grep ADS tests/files/debian_default.log

./pgweasel grep ads tests/files/debian_default.log
2025-05-02 18:25:51.151 EEST [2698052] krl@postgres ERROR: syntax error at or near "adsdas" at character 23
2025-05-02 18:25:51.151 EEST [2698052] krl@postgres STATEMENT: select dadasdas
dasda
adsdas;

  1. Would be nice to also have someting which standard "grep" has (given not too hard to implement): --context=NUM or --before-context=NUM or --after-context=NUM flags. To also include a few extra entries (not lines) around the search term. Wdyt?

@gintsgints

Copy link
Copy Markdown
Collaborator Author

Grep now is case sensitive. Made context options as global. Check README.md and tests.

@gintsgints gintsgints merged commit 02551a4 into main Jun 14, 2026
4 checks passed
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.

Add "grep" sub-command to Rust impl as well

2 participants