-
Notifications
You must be signed in to change notification settings - Fork 14
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
Unable to pass a literal asterisk to a sh*
call
#1
Comments
Fixed in kanaka/mal#470 |
chr15m
added a commit
that referenced
this issue
Dec 1, 2019
chr15m
added a commit
to chr15m/mal
that referenced
this issue
Dec 2, 2019
This supercedes kanaka#470 and includes kanaka#471. This fixes some edge cases when passing an asterisk to an sh* interop call. Before this fix mal would the string with any wildcard character converted to __STAR__ when passing to the subcommand. See the tests for examples of where this would fail to do what the user expects. See also: chr15m/flk#1
chr15m
added a commit
to chr15m/mal
that referenced
this issue
Dec 2, 2019
This supercedes kanaka#470 and includes kanaka#471. This fixes some edge cases when passing an asterisk to an sh* interop call. Before this fix mal would pass the string with any wildcard character converted to __STAR__ when passing to the subcommand. For example `(sh* "ls *")` would become `ls __STAR__` when executed. See the tests for examples of where this would fail to do what the user expects. See also: chr15m/flk#1
Upstream patch has been merged. 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given a file called
core-fns.txt
containing strings like this:The following invocation fails to capture the
[hello]
:(sh* "grep -oE '.*\]' core-fns.txt")
Internally the asterisk is escaped into
__STAR__
and passed through to bash. The following behaves in an identical way:(sh* "grep -oE '.__STAR__\]' core-fns.txt")
@kanaka I know it's been a long time since you looked at this but if you have any hints off the top if your head how a user can get around this to pass an asterisk do let me know.
The text was updated successfully, but these errors were encountered: