Define a variable in the environment section which ends in a space

Is there a way in the Cylc [environment] section to have a variable end in a space? I haven’t checked Cylc8, but in Cylc7, if I do something like

[environment]
    _ = " "

The space is not respected, instead Cylc trims the variables and provides _="" in the job script. I was wondering if there was a way to override this behaviour?

I can work around this by something like _ = " \0", but that is a bit clunky.

Hmm, I think not. Seems like an omission, since the shell allows that. Do you want to post a bug report on GitHub?

Done, Variables defined in environment cannot have trailing spaces · Issue #5080 · cylc/cylc-flow · GitHub

1 Like