-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Use grep -E / grep -F instead of egrep / fgrep #2164
Conversation
I left a bunch of comments throughout the changes files to hopefully explain what I was thinking ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look and I think it looks great, sadly I cannot test all of the changes, but they are well explained. Well done @davidpfarrell
I think we should merge this, and I will release a new stable tag :)
I can test this over the coming week on linux. I don't have a mac available anymore. |
Hi Team! @cornfeedhobo any findings from testing this? I think its time to merge - We've had 2 other PRs open on the matter so the natives are getting restless :) I usually don't like to do merges and leave that to other team members, but I may merge this one later today or tomorrow morning ... |
b4083f9
to
f4a0394
Compare
Not sure why mac jobs are failing or why re-running them (eventually) allows them to pass ... Ship it ! |
We ought to fix the lint stage, and probably understand what's going on with the Mac tests Anyway, thanks for creating and merging the pr @davidpfarrell :) |
Ensures that the -E or -F option, when used, is the first option * i.e. grep -oE => grep -E -o Updates _bash-it-grep to invoke grep with just the provided arguments * This function was (and still is) unused, but decided this new functionality was actually more useful Introduces _bash-it-fgrep to invoke grep -F Removes type -P egrep from the _bash-it-*grep functions For usages that were already going to be modified, use -F if appropriate * Does not touch grep usages that may have benefited from -F, but were not otherwise considered for this PR Adds shellcheck header to modified .bash files that didn't already have it
@davidpfarrell sorry I didn't reply in time, but yeah, this wasn't causing issues for me. thanks for moving on it!! |
* upstream/master: (1190 commits) Add support to powerline themes to override foreground color (Bash-it#2231) ci: Update GitHub actions v2 => v4 (Bash-it#2224) docs: Update Bats libraries links (Bash-it#2225) fix: bumps go version to 1.21.0 and changes go get to go install [terraform] add alias for terraform workspace fix (completion): suppress 1091 in brew (Bash-it#2130) Allow for longer command min duration (Bash-it#2198) Implement yarn completion (Bash-it#2190) Fix lint errors in multiple files (Bash-it#2192) bug: Use C style strings when checking for invalid alias characters (Bash-it#2188) Remove libra chat reference Add more aliases for `git branch`, use long form remove function wrapper around kubectl alias registration bug: Use en_US when fetching EPOCHREALTIME bug:Install shellcheck wget (Bash-it#2173) fix(theme): use correct escape sequence to avoid weird text overwriting chore: Use grep -E / grep -F instead of egrep / fgrep (Bash-it#2164) Fixed broken code blocks in troubleshooting.rst Removed Bash Dependency section from README and added it to troubleshooting.rst Update variable name to match projects.plugin.bash ...
Takes a pass at correcting usages of
egrep
andfgrep
, replacing withgrep -E
andgrep -F
, respectively.Description
Also makes a few other modifications:
-E
or-F
option, when used, is the first optiongrep -oE
=>grep -E -o
_bash-it-grep
to invokegrep
with just the provided arguments_bash-it-fgrep
to invokegrep -F
type -P egrep
from the_bash-it-*grep
functions-F
if appropriate-F
, but were not otherwise considered for this PR.bash
files that didn't already have itMotivation and Context
The
egrep
andfgrep
tools were never posix standards. As of the newly releasedv3.8
GNU grep now loudly reports a warning when invoking these tools asegrep
andfgrep
.Fixes #2163
How Has This Been Tested?
This is NOT been tested.
In fact, I had to disable the
shellcheck
andshfmt
hooks in order to get this to commit.I took a quick run at trying to correct the
shellcheck
andshfmt
errors, but there are JUST SO MANY of them, that the actual egrep changes would get lost in the noise.Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.