balpan-rs / balpan

Simple CLI Tool that supports your onboarding for a journey on source code.
37 stars 7 forks source link

Support more options for grep commands #87

Closed notJoon closed 11 months ago

notJoon commented 11 months ago

:star2: What does this PR do?

Created additional commands to grep to handle more complex rules.

For example, the option -i is case-insensitive for patterns. -H serves to display only the line where the pattern is located, and -c serves to display the number of patterns found. Option -o is colorize the matching patterns.

Also, can use the -E flag to search for patterns using a regex. However, it's slow rather than boyer-moore, so I'd probably encourage users to use it for single files only.

Many other options have been implemented, and these commands can now be combined to make complex behavior easy to use.

:memo: Links to relevant issues or information

However, it doesn't yet support JSON format, which we'll fix later.

Relative Issue

77