Skip to content

Add condition field to custom command prompts#5364

Open
mrt181 wants to merge 1 commit intojesseduffield:masterfrom
mrt181:add-conditional-prompts
Open

Add condition field to custom command prompts#5364
mrt181 wants to merge 1 commit intojesseduffield:masterfrom
mrt181:add-conditional-prompts

Conversation

@mrt181
Copy link

@mrt181 mrt181 commented Mar 12, 2026

When building multi-step custom command forms, some prompts are only relevant depending on earlier answers. Without conditional logic, users must dismiss irrelevant prompts manually.

Prompts now accept a condition field with a template expression evaluated against prior form values. Skipped prompts default to an empty string.

PR Description

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

When building multi-step custom command forms, some prompts are only
relevant depending on earlier answers. Without conditional logic,
users must dismiss irrelevant prompts manually.

Prompts now accept a `condition` field with a template expression
evaluated against prior form values. Skipped prompts default to
an empty string.
@mrt181 mrt181 force-pushed the add-conditional-prompts branch from e934c7c to 4040756 Compare March 16, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant