-
-
Notifications
You must be signed in to change notification settings - Fork 81
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 strings in bash #2586
Comments
@AndreasArvidsson fyi this doesn't work either on today's |
This is one of those things we probably need to use the parse tree (program
(variable_assignment
name: (variable_name)
"="
value: (string
"""
(command_substitution
"$("
(command
name: (command_name
(word)
)
argument: (word)
argument: (number)
argument: (concatenation
(word)
(string
"""
(string_content)
"""
)
)
argument: (word)
)
")"
)
"""
)
)
) |
I think we could just use parse tree to tell us if it's opening or closing? |
Text fragment thing will get in the way a bit tho I fear as well treat the string as a fragment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In bash, we don't properly support strings. For example:
commit_message="$(git log -1 --pretty=format:"%s" HEAD)"
This is actually two nested strings:
"$(git log -1 --pretty=format:"%s" HEAD)"
and"%s"
. Instead we treat it as two strings in sequence:"$(git log -1 --pretty=format:"
and" HEAD)"
. We should figure out how to make this work, probably using the parse tree, and/or some flavour of #1812 (comment)The text was updated successfully, but these errors were encountered: