From f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0 Mon Sep 17 00:00:00 2001 From: Aditya Srivastava Date: Sun, 11 Aug 2019 20:42:49 -0700 Subject: add close command at global level --- commands/terminal/close.go | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 commands/terminal/close.go (limited to 'commands/terminal') diff --git a/commands/terminal/close.go b/commands/terminal/close.go deleted file mode 100644 index 8256e674..00000000 --- a/commands/terminal/close.go +++ /dev/null @@ -1,30 +0,0 @@ -package terminal - -import ( - "errors" - - "git.sr.ht/~sircmpwn/aerc/widgets" -) - -type Close struct{} - -func init() { - register(Close{}) -} - -func (_ Close) Aliases() []string { - return []string{"close"} -} - -func (_ Close) Complete(aerc *widgets.Aerc, args []string) []string { - return nil -} - -func (_ Close) Execute(aerc *widgets.Aerc, args []string) error { - if len(args) != 1 { - return errors.New("Usage: close") - } - term, _ := aerc.SelectedTab().(*widgets.Terminal) - term.Close(nil) - return nil -} -- cgit