1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-04-07 19:17:06 +02:00
Files
Martin T. 4cb6fafb08 Add condition field to custom command prompts
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.

The template expression is a string pre- and suffixed with double curly
braces - {{}}.

Form keys can be reused, a guard ensures that skipped prompts do not
reset already set form keys with an empty string. This allows the
conditional flow to remind a user to set a key that was left empty
because additional conditions want that key to be set. This removes the
need to have additional if checks in the command that uses the form
keys.
2026-04-06 19:14:51 +02:00
..
2025-10-14 12:27:32 +02:00
2025-10-09 08:45:58 +02:00
2025-08-01 10:35:16 +02:00
2025-11-16 17:26:00 +01:00
2025-10-09 08:45:58 +02:00
2026-03-19 16:57:53 +01:00
2025-10-19 21:24:28 +02:00
2025-01-03 10:50:36 +11:00