mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-02 09:21:40 +02:00
fallback to value if name not given
This commit is contained in:
parent
e7210dd249
commit
5724fa534a
@ -121,7 +121,12 @@ func (gui *Gui) handleCustomCommandKeybinding(customCommand CustomCommand) func(
|
||||
for i, option := range prompt.Options {
|
||||
option := option
|
||||
|
||||
name, err := gui.resolveTemplate(option.Name, promptResponses)
|
||||
nameTemplate := option.Name
|
||||
if nameTemplate == "" {
|
||||
// this allows you to only pass values rather than bother with names/descriptions
|
||||
nameTemplate = option.Value
|
||||
}
|
||||
name, err := gui.resolveTemplate(nameTemplate, promptResponses)
|
||||
if err != nil {
|
||||
return gui.surfaceError(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user