-
Notifications
You must be signed in to change notification settings - Fork 123
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
use sed -r instead of -E when using GNU sed #171
Conversation
bump |
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.
Built a version of GNU sed
from before -E was added (I used 4.1.5, it was added 4.2), and then tested with that sed
, my system's recent GNU sed
, and macOS sed
. All behaved as they should.
@BKasin can you try the latest commit, I reworked it into a wrapper function that replaces the arguements if sed is GNU sed, should be completely transparent so nobody has to remember to add $sed_ext to every sed command from now on |
Will do. |
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.
Nice fix, thanks! And @BKasin thank you so much for the detailed testing! |
sed -r and -E do the same thing, but sed -E is the portable version that works with all versions of sed, however some old versions of GNU sed only support -r, a workaround is to check if we're running GNU sed, and use -r if we are