mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
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>
This commit is contained in:
@ -34,6 +34,11 @@ func (self *Resolver) resolvePrompt(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result.Body, err = resolveTemplate(prompt.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result.Command, err = resolveTemplate(prompt.Command)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user