jesseduffield.lazygit/pkg/config
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
..
app_config.go Cache PRs in AppState so that they appear immediately at startup 2026-04-01 09:13:55 +02:00
app_config_test.go Add config migration of paging section to pagers array 2025-10-14 12:17:13 +02:00
config_default_platform.go Clean up build tags 2025-08-14 20:40:44 +02:00
config_linux.go Fix opening links containing ampersands (&) in WSL 2024-12-04 09:43:30 +01:00
config_windows.go Change OpenCommand to Open and OpenLinkCommand to OpenLink 2023-04-13 13:14:00 +02:00
dummies.go Make fields of AppConfig private 2024-08-18 10:24:52 +02:00
editor_presets.go fix(config): add Nushell support for nvim-remote preset 2026-02-07 09:00:10 +01:00
editor_presets_test.go Fix nvim-remote commands for fish shell 2025-04-27 20:12:11 +02:00
keynames.go Validate keybindings 2025-02-21 13:20:53 +01:00
pager_config.go Replace paging config with an array of pagers 2025-10-14 12:17:13 +02:00
user_config.go Add condition field to custom command prompts 2026-04-06 19:14:51 +02:00
user_config_validation.go Make file sort order and case sensitivity configurable 2026-03-30 17:53:25 +02:00
user_config_validation_test.go feat: support custom keybinds in custom command prompt menus 2025-12-22 13:43:52 +01:00