Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - trigger: :test
- replace: "{{output}}"
- vars:
- - name: select
- type: choice
- params:
- values: ["1","2"]
- - name: items
- type: shell
- params:
- cmd: |
- # Generate lists for second choice:
- items=("a" "b" "c") # Items for choice "1"
- printf "%s\n" "${items[@]}" > $CONFIG/match/file1 # or Windows equivalents
- items=("d" "e" "f") # Items for choice "2"
- printf "%s\n" "${items[@]}" > $CONFIG/match/file2 # or Windows equivalents
- # Generate {{items}} dependent on first choice
- cat $CONFIG/match/file{{select}} # or "type" for Windows
- # Remove temporary files
- rm -f $CONFIG/match/file1 $CONFIG/match/file2
- - name: output
- type: choice
- params:
- values: "{{items}}"
Advertisement
Comments
-
- The trigger, :test invokes the first select choice box, which supplies a digit, 1 or 2, which is suffixed to the filename for the cat command in the items variable. This supplies the three options from file1 or file2 for the second output choice variable.
Add Comment
Please, Sign In to add comment
Advertisement