Closed tinder-ryantrontz closed 1 year ago
Note: This is my first (of many I hope) contributions to the Gradle community. I tested these changes locally with bash and zsh, and the warning no longer shows up, and the completions still work correctly, both with project paths and directory paths. If there are any other testing steps or info needed on the PR, please feel free to let me know.
Thank you for reviewing this PR!
Thank you for your first and hopefully one of many contributions 😉
This looks good!
This commit replaces the use of
egrep
withgrep -E
.Motivation
When this project invokes
egrep
on a machine using GNU grep versions >= 3.8, a warning is printed to the console thategrep
is obsolescent. This warning is interleaved with the in-progress terminal command, and creates an undesirable user experience. This is reproducible when a build is run (nearly-)immediately after the shell has initialized and the completion cache hasn't been populated.Example output: This command intends to run a Gradle task on a subproject in the
worker/
directory in a multi-project repo. When the user pressesTab
after a few characters, this warning shows up and locks up the terminal for a few seconds.Additional Background
egrep
andfgrep
were marked as "not needed" and not part of the official POSIX standard in 2007.egrep
orfgrep
invoked.