I want to reference nested elements of an anchored dictionary elsewhere in the same yaml doc.
Can I do this without having to define anchors for each nested element?
Presently, my draft definition looks like this:
device: &device
root: &device.root /media/user
data: &device.somedrive *device.root/somedrivename
(The rationale for nesting like this: group all such devices together, in a yaml doc with other definitions that are not devices, but paths. The definitions in &device are used to construct those other paths later in the same yaml doc).
But that seems long-winded and cluttered to me
The snippet defines anchors not only for the device dictionary, but also for each of its nested elements.
Desired solution
I’d like other definitions in the same file to alias nested elements of an anchor without each of those elements having dedicated anchors of there own.
So allowing the definition to be simply something like:
device: &device
root: /media/user
data: *device.root/somedrivename
How can I do that?