Skip to content

#15 Add grep subcommand#27

Open
gintsgints wants to merge 4 commits intomainfrom
15-add-grep-sub-command-to-rust-impl-as-well
Open

#15 Add grep subcommand#27
gintsgints wants to merge 4 commits intomainfrom
15-add-grep-sub-command-to-rust-impl-as-well

Conversation

@gintsgints
Copy link
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
Copy link
Owner

@kmoppel kmoppel left a comment

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
Collaborator Author

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

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