diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-21 16:32:22 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-21 16:32:22 -0400 |
commit | 10dd23f05d271a27ad40a6fafffb5fe2c3e5fe57 (patch) | |
tree | a2fe85d9e0de5a972bfa7705558e7d50e95445c3 /commands/term-close.go | |
parent | 8126d82956636a2525263e2d0d985d721fdb8074 (diff) | |
download | aerc-10dd23f05d271a27ad40a6fafffb5fe2c3e5fe57.tar.gz |
Add terminal command context
Diffstat (limited to 'commands/term-close.go')
-rw-r--r-- | commands/term-close.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/commands/term-close.go b/commands/term-close.go deleted file mode 100644 index 7da4f42..0000000 --- a/commands/term-close.go +++ /dev/null @@ -1,24 +0,0 @@ -package commands - -import ( - "errors" - - "git.sr.ht/~sircmpwn/aerc2/widgets" -) - -func init() { - // TODO: Move this command into a terminal-specific command set - register("close", TermClose) -} - -func TermClose(aerc *widgets.Aerc, args []string) error { - if len(args) != 1 { - return errors.New("Usage: close") - } - thost, ok := aerc.SelectedTab().(*widgets.TermHost) - if !ok { - return errors.New("Error: not a terminal") - } - thost.Terminal().Close(nil) - return nil -} |