@@ -166,7 +166,8 @@ not in the ``environ`` dict):
166
166
Version of Cylc used.
167
167
168
168
``CYLC_TEMPLATE_VARS ``
169
- All variables set by the ``-s `` or ``--set-file `` options, or by a plugin.
169
+ All variables set by the ``-s ``, ``--set-file `` or ``--set-list `` options,
170
+ or by a plugin.
170
171
171
172
172
173
.. _CustomJinja2Filters :
@@ -262,10 +263,11 @@ Here's the result:
262
263
Default Values and Template Variables
263
264
-------------------------------------
264
265
265
- You can provide template variables to Cylc in 3 ways:
266
+ You can provide template variables to Cylc in 4 ways:
266
267
267
- - Using the ``--set-file `` option.
268
- - Using the ``-s `` option.
268
+ - Using the ``--set-file `` (``-S ``) option.
269
+ - Using the ``--set `` (``-s ``) option.
270
+ - Using the ``--set-list `` (``-z ``) option.
269
271
- `Using a plugin `_, such as :ref: `Cylc Rose `.
270
272
271
273
.. note ::
@@ -274,15 +276,26 @@ You can provide template variables to Cylc in 3 ways:
274
276
above list is used.
275
277
276
278
277
- The ``-s `` and ``--set-file `` Options
278
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
279
+ The ``-s ``, `` -z `` and ``--set-file `` Options
280
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
279
281
280
282
.. code-block :: console
281
283
282
284
$ # set the Jinja2 variable "answer" to 42
283
285
$ cylc play <workflow-id> -s answer=42
284
286
285
- Or for multiple variables defined in a file, use the ``--set-file `` option:
287
+ A Python string-list is a valid value, but a lot to type, so ``--set-list ``
288
+ (``-z ``) is provided as a convenience:
289
+
290
+ .. code-block :: console
291
+
292
+ # The set syntax
293
+ $ cylc play <workflow-id> -s "answers=['mice', 'dolphins']"
294
+ # ... can be shortened to:
295
+ $ cylc play <workflow-id> -z answers=mice,dolphins
296
+
297
+ If you need to define a lot of variables, you can so in a file
298
+ using the ``--set-file `` option:
286
299
287
300
.. code-block :: console
288
301
0 commit comments