mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Extract a method CustomCommand.GetDescription
We'll reuse it in the next commit.
This commit is contained in:
parent
f93948cb23
commit
e799976b8a
2 changed files with 9 additions and 6 deletions
|
@ -640,6 +640,14 @@ type CustomCommand struct {
|
|||
After *CustomCommandAfterHook `yaml:"after"`
|
||||
}
|
||||
|
||||
func (c *CustomCommand) GetDescription() string {
|
||||
if c.Description != "" {
|
||||
return c.Description
|
||||
}
|
||||
|
||||
return c.Command
|
||||
}
|
||||
|
||||
type CustomCommandPrompt struct {
|
||||
// One of: 'input' | 'menu' | 'confirm' | 'menuFromCommand'
|
||||
Type string `yaml:"type"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue