Skip to content

Commit

Permalink
doc: explain whitespace in env vars (cylc#5629)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders authored Jul 17, 2023
1 parent 33a30f1 commit 7dc5e41
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
You can also specify job environment templates here for
:ref:`parameterized tasks <User Guide Param>`.
'''):
Conf('<variable>', VDR.V_STRING, desc='''
Conf('<variable>', VDR.V_STRING, desc=r'''
A custom user defined variable for a task execution
environment.
Expand Down Expand Up @@ -1635,6 +1635,32 @@ def get_script_common_text(this: str, example: Optional[str] = None):
MYITEM = %(item)s
MYFILE = /path/to/%(i)03d/%(item)s
.. note::
As with other Cylc configurations, leading or trailing
whitespace will be stripped, so the following two
examples are equivalent:
.. list-table::
:class: grid-table
* - .. code-block:: cylc
[environment]
FOO = " a "
BAR = """
$(foo bar baz)
"""
- .. code-block:: cylc
[environment]
FOO = "a"
BAR = "$(foo bar baz)"
If leading or trailing whitespace is required, consider
using the ``\0`` escape character, or set the variable
in :cylc:conf:`[..][..]env-script`.
.. versionchanged:: 7.8.7/7.9.2
Parameter environment templates (previously in
Expand Down

0 comments on commit 7dc5e41

Please sign in to comment.