File tree Expand file tree Collapse file tree 4 files changed +30
-28
lines changed Expand file tree Collapse file tree 4 files changed +30
-28
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ take action on any warnings.
46
46
.. TODO Add ref to breaking changes section within Major changes, once created,
47
47
including optional ouputs.
48
48
49
+ .. note ::
50
+
51
+ Validation warnings use a :ref: `shorthand notation<config_item_shorthand> `
52
+ to refer to nested configuration settings on a single line, like this:
53
+ ``[section][sub-section]item ``.
49
54
50
55
51
56
New Web and Terminal UIs
Original file line number Diff line number Diff line change @@ -158,23 +158,19 @@ Include-files
158
158
:ref: `Jinja2's <Jinja >` template inclusion mechanism can be used with Cylc
159
159
too.
160
160
161
+ .. _config_item_shorthand :
161
162
162
163
Shorthand
163
164
---------
164
165
165
- Throughout the documentation we refer to configuration settings in the
166
- following way:
167
-
168
- ``[section] ``
169
- An entire section.
170
- ``[section]setting ``
171
- A setting within a section.
172
- ``[section]setting=value ``
173
- The value of a setting within a section.
174
- ``[section][sub-section]another-setting ``
175
- A setting within a sub-section.
176
-
177
- .. warning ::
178
- We only use one set of square brackets at each level when writing nested
179
- sections on one line like this. But in the file, each sub-section
180
- gets additional square brackets as shown above.
166
+ .. include :: shorthand.rst
167
+
168
+ .. code-block :: cylc
169
+
170
+ # This:
171
+ # [runtime][task-a][environment]FOO = foo
172
+ # Means:
173
+ [runtime]
174
+ [[task-a]]
175
+ [[[environment]]]
176
+ FOO = foo
Original file line number Diff line number Diff line change
1
+ We often use a compact single-line notation to refer to nested config items:
2
+
3
+ ``[section] ``
4
+ An entire section.
5
+ ``[section]setting ``
6
+ A setting within a section.
7
+ ``[section]setting=value ``
8
+ The value of a setting within a section.
9
+ ``[section][sub-section]another-setting ``
10
+ A setting within a sub-section.
11
+
12
+ In the file, however, section headings need additional brackets at each level.
Original file line number Diff line number Diff line change @@ -58,18 +58,7 @@ Example
58
58
Shorthand
59
59
^^^^^^^^^
60
60
61
- Throughout this tutorial we will refer to configuration settings in the following ways:
62
-
63
- ``[section] ``
64
- An entire section.
65
- ``[section]key ``
66
- A specific config item, within a section.
67
- ``[section]key=value ``
68
- The value of a specific config item, within a section.
69
- ``[section][sub-section]another-key ``
70
- Note we only use one set of square brackets per section heading when
71
- writing on one line like this. In the config file each nested level
72
- gets another set of square brackets.
61
+ .. include :: ../../reference/config/shorthand.rst
73
62
74
63
Duplicate Items
75
64
^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments