Skip to content
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

Standard grep command fails on MacOS #68

Closed
pandel opened this issue May 1, 2020 · 9 comments
Closed

Standard grep command fails on MacOS #68

pandel opened this issue May 1, 2020 · 9 comments

Comments

@pandel
Copy link
Contributor

pandel commented May 1, 2020

Hi!

The perl style grep -ioP commands should be reworked. They don't work in MacOS anymore.

See: https://stackoverflow.com/questions/16658333/grep-p-no-longer-works-how-can-i-rewrite-my-searches

Regards,
Holger

@diogocavilha
Copy link
Owner

diogocavilha commented May 3, 2020

Hello, @pandel. Hope you're doing well.

Doesn't that work even if you brew install grep?

@pandel
Copy link
Contributor Author

pandel commented May 4, 2020

Hey @diogocavilha! I do and I hope, you too! Not too obvious these days...

That's a hint, I didn't try that. Usually I do not replace programs belonging to the main OS with other versions if I don't have to. The same is for sed, btw. It is also not working correctly.

But perhaps I'll replace them with the homebrew versions.

Thanks. I consider this as solved, even though I am not sure, if I'll use the brew versions or not ;-)

Perhaps you should give a hint in the installation section regarding installation of the brew versions on Mac...

@pandel pandel closed this as completed May 4, 2020
@diogocavilha
Copy link
Owner

diogocavilha commented May 4, 2020

@pandel
Yes, things are getting harder lately.

You're right, I'll add this hint on readme file.
Please, let me know if any related bug shows up.

Thank you!

@diogocavilha
Copy link
Owner

Oh! I've just seen it is already there =D

Take a look... https://github.com/diogocavilha/fancy-git#problems-with-grep-command

@pandel
Copy link
Contributor Author

pandel commented May 5, 2020

Yes, you are right, I overlooked those entries, too :-)!

I did "brew install grep gnu-sed" right now and things are a bit more delicate, I think.

Both, grep and sed, are installed as "ggrep" and "gsed" to separate from the system default. Generally, I think it would be wise to keep this separation working instead of adding the necessary PATH changes.

Nevertheless, I'll add the PATH parts to my bash profile and see if it introduces any problems.

@pandel
Copy link
Contributor Author

pandel commented May 5, 2020

BTW, there is still a single error if you issue "fancygit" without any parameter:

/Users/myuser/.fancy-git/commands.sh: line 203: return: can only "return" from a function or sourced script

I am still using bash, not zsh! Just removed the "return" in the line and everything is fine, at least under Mac OS :-) - I don't think it is necessary on Linux either.

@diogocavilha
Copy link
Owner

diogocavilha commented May 5, 2020

BTW, there is still a single error if you issue "fancygit" without any parameter:

/Users/myuser/.fancy-git/commands.sh: line 203: return: can only "return" from a function or sourced script

I am still using bash, not zsh! Just removed the "return" in the line and everything is fine, at least under Mac OS :-) - I don't think it is necessary on Linux either.

Yes, it seems to be a Mac issue. I've tested it here and nothing happens.
Anyway, I'm gonna release this fix on next version, which is just around the corner! Thank you for that one!

Btw... could you please, open a new issue for that one?

@pandel
Copy link
Contributor Author

pandel commented May 5, 2020

Sure, here it comes: #69

@diogocavilha
Copy link
Owner

Sure, here it comes: #69

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants