Timeline for Double Quotes not escaped in eclipse shell command for preprocessor define
Current License: CC BY-SA 4.0
Post Revisions
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 20, 2025 at 15:23 | history | edited | elechris | CC BY-SA 4.0 |
added 1 character in body
|
| Feb 18, 2025 at 17:34 | comment | added | pmacfarlane |
I spent about an hour trying to make this work in Eclipse with no success. It definitely does weird things to backslashes. Also part of the problem is I think you need to have three layers of nested quotes. But there are only two types of quotes, and they're not nestable (i.e. you can't have a ' character inside another ' quoted region without it just closing the first ').
|
|
| Feb 18, 2025 at 16:13 | comment | added | John Bollinger | @elechris, that you're trying to to get Eclipse to define a C preprocessor macro, and how, is now much clearer. That's relevant information. That it is a preprocessor macro is tangential, however. The problem is that you're not getting the data into your build that you want to do; the significance of that data to the build doesn't help to inform an answer. | |
| Feb 18, 2025 at 16:09 | answer | added | John Bollinger | timeline score: 2 | |
| Feb 18, 2025 at 15:45 | comment | added | elechris | @JohnBollinger " What does this have to do with C or the C preprocessor?" It's a C preprocessor define. "Or with Eclipse?" it's defined in eclipse | |
| Feb 18, 2025 at 15:42 | comment | added | elechris | @pmacfarlane added expected output | |
| Feb 18, 2025 at 15:41 | comment | added | elechris | @sseLtaH doesn't work. Produces empty string. | |
| Feb 18, 2025 at 15:11 | history | edited | John Bollinger |
edited tags
|
|
| Feb 18, 2025 at 14:56 | history | edited | elechris | CC BY-SA 4.0 |
added 71 characters in body
|
| Feb 18, 2025 at 14:47 | comment | added | John Bollinger |
It looks like you are setting GIT_STATUS as a make variable, or maybe a shell variable. What does this have to do with C or the C preprocessor? Or with Eclipse?
|
|
| Feb 18, 2025 at 14:35 | comment | added | pmacfarlane | Please give an example of what your expected output is. It's not very clear (to me). | |
| Feb 18, 2025 at 13:27 | comment | added | sseLtaH |
creating a variable rather than a file may work for the one line. You could try GIT_STATUS="$(var='s/"/\\\"/g' ; sed -f <(echo $var) <(shell git status -s))"
|
|
| Feb 18, 2025 at 13:18 | history | edited | elechris | CC BY-SA 4.0 |
edited tags; edited title
|
| Feb 18, 2025 at 13:10 | history | asked | elechris | CC BY-SA 4.0 |