mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
Remove return value of Alert/Confirm/Prompt
This might seem controversial; in many cases the client code gets longer, because it needs an extra line for an explicit `return nil`. I still prefer this, because it makes it clearer which calls can return errors.
This commit is contained in:
@ -15,7 +15,7 @@ type ShellCommandAction struct {
|
||||
}
|
||||
|
||||
func (self *ShellCommandAction) Call() error {
|
||||
return self.c.Prompt(types.PromptOpts{
|
||||
self.c.Prompt(types.PromptOpts{
|
||||
Title: self.c.Tr.ShellCommand,
|
||||
FindSuggestionsFunc: self.GetShellCommandsHistorySuggestionsFunc(),
|
||||
AllowEditSuggestion: true,
|
||||
@ -54,6 +54,8 @@ func (self *ShellCommandAction) Call() error {
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *ShellCommandAction) GetShellCommandsHistorySuggestionsFunc() func(string) []*types.Suggestion {
|
||||
|
Reference in New Issue
Block a user