Skip to content

Instantly share code, notes, and snippets.

@smeech
Last active April 27, 2025 21:52
Show Gist options
  • Select an option

  • Save smeech/4df709245d2c616e686628d6bc78f645 to your computer and use it in GitHub Desktop.

Select an option

Save smeech/4df709245d2c616e686628d6bc78f645 to your computer and use it in GitHub Desktop.
[Second choice conditional on first choice] The trigger, `:test` invokes the first "select" choice box which supplies the options for the second "output" choice variable. Rewritten from the previous version which relied on writing files. The technique is not possible using verbose syntax, so cannot be combined with a "layout:" field. #espanso
matches:
- trigger: :test
replace: "{{output}}"
vars:
- name: select
type: choice
params:
values:
- label: One
id: |
a
b
c
- label: Two
id: |
d
e
f
- name: output
type: choice
params:
values: "{{select}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment