chore: Use grep -E / grep -F instead of egrep / fgrep#2164
chore: Use grep -E / grep -F instead of egrep / fgrep#2164davidpfarrell merged 1 commit intoBash-it:masterfrom
Conversation
|
I left a bunch of comments throughout the changes files to hopefully explain what I was thinking ... |
NoahGorny
left a comment
There was a problem hiding this comment.
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
egrepandfgrep, replacing withgrep -Eandgrep -F, respectively.Description
Also makes a few other modifications:
-Eor-Foption, when used, is the first optiongrep -oE=>grep -E -o_bash-it-grepto invokegrepwith just the provided arguments_bash-it-fgrepto invokegrep -Ftype -P egrepfrom the_bash-it-*grepfunctions-Fif appropriate-F, but were not otherwise considered for this PR.bashfiles that didn't already have itMotivation and Context
The
egrepandfgreptools were never posix standards. As of the newly releasedv3.8GNU grep now loudly reports a warning when invoking these tools asegrepandfgrep.Fixes #2163
How Has This Been Tested?
This is NOT been tested.
In fact, I had to disable the
shellcheckandshfmthooks in order to get this to commit.I took a quick run at trying to correct the
shellcheckandshfmterrors, 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.txtand formatted it usinglint_clean_files.sh.