summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/files_controller.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-02-05 11:00:57 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit8e3484d8e98faf12f8395eaf5f9e8381f77a8e52 (patch)
tree66334c4a08240e3f7dad0926bacea2a0e5b6def3 /pkg/gui/controllers/files_controller.go
parent226985bf7602763f7578ef236bdc4cec3a1494e9 (diff)
add global controller
Diffstat (limited to 'pkg/gui/controllers/files_controller.go')
-rw-r--r--pkg/gui/controllers/files_controller.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go
index 1f9521867..c8af30e62 100644
--- a/pkg/gui/controllers/files_controller.go
+++ b/pkg/gui/controllers/files_controller.go
@@ -171,12 +171,6 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types
Description: self.c.Tr.FileEnter,
},
{
- ViewName: "",
- Key: opts.GetKey(opts.Config.Universal.ExecuteCustomCommand),
- Handler: self.handleCustomCommand,
- Description: self.c.Tr.LcExecuteCustomCommand,
- },
- {
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
Handler: self.createResetMenu,
Description: self.c.Tr.LcViewResetToUpstreamOptions,
@@ -577,31 +571,6 @@ func (self *FilesController) switchToMerge() error {
return self.switchToMergeFn(file.Name)
}
-func (self *FilesController) handleCustomCommand() error {
- return self.c.Prompt(types.PromptOpts{
- Title: self.c.Tr.CustomCommand,
- FindSuggestionsFunc: self.suggestionsHelper.GetCustomCommandsHistorySuggestionsFunc(),
- HandleConfirm: func(command string) error {
- self.c.GetAppState().CustomCommandsHistory = utils.Limit(
- utils.Uniq(
- append(self.c.GetAppState().CustomCommandsHistory, command),
- ),
- 1000,
- )
-
- err := self.c.SaveAppState()
- if err != nil {
- self.c.Log.Error(err)
- }
-
- self.c.LogAction(self.c.Tr.Actions.CustomCommand)
- return self.c.RunSubprocessAndRefresh(
- self.os.Cmd.NewShell(command),
- )
- },
- })
-}
-
func (self *FilesController) createStashMenu() error {
return self.c.Menu(types.CreateMenuOptions{
Title: self.c.Tr.LcStashOptions,