diff options
author | Michael Mead <mmead.developer@gmail.com> | 2022-06-24 22:37:10 -0700 |
---|---|---|
committer | Michael Mead <mmead.developer@gmail.com> | 2022-07-04 11:36:13 -0700 |
commit | 9d304098bb91336f621fefdef53a645b22dbb9d5 (patch) | |
tree | 0cf131bab84d7de474724356f1f858c0c6de4eaf /pkg/config/user_config.go | |
parent | 582b1991a47fc53436ee20ac52479cd48004a56d (diff) |
feat: add confirm prompt for custom keybindings
- Supports configuring a custom confirmation prompt via `config.yml` for
custom keybindings. A new `CustomCommandPrompt.Body` field is
used to store the immutable body text of the confirmation popup.
- Adds a sample 'confirm' prompt to the example `config.yml`.
- Updates the `Prompts` section of the documentation to include
'confirm' prompt type and also describe which fields pertain to it
(i.e. `initialValue`).
Closes: https://github.com/jesseduffield/lazygit/issues/1858
Signed-off-by: Michael Mead <mmead.developer@gmail.com>
Diffstat (limited to 'pkg/config/user_config.go')
-rw-r--r-- | pkg/config/user_config.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 0b3a91bf6..650594a50 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -313,12 +313,15 @@ type CustomCommand struct { } type CustomCommandPrompt struct { - Type string `yaml:"type"` // one of 'input' and 'menu' + Type string `yaml:"type"` // one of 'input', 'menu', or 'confirm' Title string `yaml:"title"` // this only apply to prompts InitialValue string `yaml:"initialValue"` + // this only applies to confirm prompts + Body string `yaml:"body"` + // this only applies to menus Options []CustomCommandMenuOption |