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

fix: Make sure that files with + in their name get escaped #1555

Closed

Conversation

patrickomatic
Copy link

Summary

Hi, I'm working on a program with ++ in the name, similar to g++ and I noticed that calling it produces this grep error.

 grep: repetition-operator operand invalid

So included is just a change that escapes the core regexp characters that could occur in a filename

Fixes: List issue numbers here

Other Information

@patrickomatic patrickomatic requested a review from a team as a code owner May 3, 2023 21:50
@patrickomatic patrickomatic force-pushed the fix-bash-utils-escaping branch 2 times, most recently from b4317f0 to 685734f Compare May 3, 2023 22:36
@patrickomatic patrickomatic changed the title Make sure that files with + in their name get escaped fix: Make sure that files with + in their name get escaped May 3, 2023
otherwise if you have a command like g++, csv++ you will see the
following error:

 grep: repetition-operator operand invalid

PATCH: fixes a bug for keys with `+` characters
@hyperupcall
Copy link
Contributor

hyperupcall commented Jun 4, 2023

This change seems to have no effect on how files with + are handled? I change the code to local key=$2, run the test suite, and everything passes?

And the code seems to indicate that this escaping is only for keys of the config file (get_asdf_config_value_from_file). Maybe there is a better test or this change isn't needed?

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.

None yet

3 participants