mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-21 22:43:27 +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 {
|
for i, option := range prompt.Options {
|
||||||
option := option
|
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 {
|
if err != nil {
|
||||||
return gui.surfaceError(err)
|
return gui.surfaceError(err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user