Skip to content

Perform exact word match on brew + grep#23

Open
gnclmorais wants to merge 1 commit intominamarkham:masterfrom
gnclmorais:brew-exact-word-match
Open

Perform exact word match on brew + grep#23
gnclmorais wants to merge 1 commit intominamarkham:masterfrom
gnclmorais:brew-exact-word-match

Conversation

@gnclmorais
Copy link
Copy Markdown

@gnclmorais gnclmorais commented Sep 27, 2020

Example: if looking for “git” and there is “git” and “gitish” on the results list, this command will complain because grep encounters more than one match. This fix makes sure it matches on the whole word.

Without this flag, I was getting more than one matches with the words git and heroku:

✦  4. Installing Homebrew formulae…
└─────────────────────────────────────────────────────○
  [↓] Installing asciinema Updating Homebrew...
✓ installed!
  [✓] fish already installed. Skipped.
twirl: line 549: test: git: unary operator expected
  [✓] git already installed. Skipped.
twirl: line 549: test: heroku-node: binary operator expected

P.S.: Thanks for this repo, super useful to set up new MacBooks! 🙌

Example: if looking for “git” and there is “git” and “gitish” on
the results list, this command will complain. This fix makes sure
it matches on the whole word.

install_brews() {
if test ! $(brew list | grep $brew); then
if test ! $(brew list | grep -x $brew); then
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More info about this option:
image

@gnclmorais
Copy link
Copy Markdown
Author

Hey @minamarkham, are you still supporting this project? I’d be happy to help as a maintainer, I really like it. 😃

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.

1 participant