1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-24 05:36:19 +02:00

19 lines
539 B
Go
Raw Normal View History

2022-01-08 14:00:36 +11:00
package git_commands
2022-01-07 20:33:34 +11:00
type CustomCommands struct {
*GitCommon
2022-01-07 20:33:34 +11:00
}
func NewCustomCommands(gitCommon *GitCommon) *CustomCommands {
2022-01-07 20:33:34 +11:00
return &CustomCommands{
GitCommon: gitCommon,
2022-01-07 20:33:34 +11:00
}
}
// Only to be used for the sake of running custom commands specified by the user.
// If you want to run a new command, try finding a place for it in one of the neighbouring
// files, or creating a new BlahCommands struct to hold it.
func (self *CustomCommands) RunWithOutput(cmdStr string) (string, error) {
return self.cmd.New(cmdStr).RunWithOutput()
}