-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Milestone
Description
Allow list indexing and slicing.
variables:
foo:
- mod1
- mod2
- mod3
nums: [1, 2, 3, 4]
bar: '{{foo[0] + foo[-1]}}'
baz: '{{foo[1:]}}'
build:
modules:
- 'other_mod1'
- '{{baz}}'
bar
would be equal to '3'
baz
would be a list of ['mod2', 'mod3'], and 'build.modules' would be ['other_mod1', 'mod2', 'mod3']
The changes is actually fairly simple; when resolving strings, allow lists of strings instead of just strings. When these are returned, if the resolved string is already part of a list, extend the whole list. It will be an error to extend a list of other structures, however, or get back anything more complex than a list of strings.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity