---------- Forwarded message ---------- From: Peter Anglea <[hidden email]> To: [hidden email] Date: Fri, 26 Oct 2018 10:12:17 -0400 Subject: Complex --evaluate command line option I’m trying to use the -e (--evaluate) option to define a hash, not just a single variable. For instance
The above doesn’t work. I think, obviously, it’s breaking at the single quote – ‘foo.
I’ve tried escaping it with a backslash (\’foo) and a couple other things, but nothing seems to work.
Is it possible to run complex Scheme code in the command line option,
and/or am I just not escaping special characters the right way?
I'm just going to comment on bash shell syntax, since I'm not quite sure what to expect the scheme code to do in lilypond, or if there are any prerequisites of file.ly for this command to work.
In any case, for bash shell syntax:
Within single quotes, there is no evaluation, no escaping, and everything is taken as-is.
Within double quotes, things are evaluated, and the backslash character is used to escape (to prevent evaluation, as well as to include double quotes within the string).
Outside of quotes, things are evaluated and the backslash character is used to escape.
The only difference in this regard between double quotes and no quotes is that everything within double quotes is taken as a "word", and outside of quotes, whitespace delineates "words". (Outside quotes, you can escape spaces to prevent splitting of words on whitespace).