Deep copies
Deep copying works like copying, except you use two angle brackets (<<
) instead of one,
which in turn allows you to overwrite and/or add fields inside deeply nested section hierarchies.
# default
id:
## settings
hyperservice: disabled
# production << default
id: prod
## settings
ultraservice: enabled
In this example the resulting # production
section will contain both hyperservice
and ultraservice
inside its ## settings
subsection, whereas if you used only a regular copy operation (single <
),
the ## settings
from # default
would have been completely overwritten, deleting hyperservice
and
leaving only ultraservice
. A typical usecase for this feature are complex server configurations.
Next page: Escaping