From fb3923f344a0cb4df17df3df71277c82689f7979 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sat, 12 Jan 2019 22:58:16 -0500 Subject: [PATCH] Open default shell if no term args --- cmd/micro/action/command.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/micro/action/command.go b/cmd/micro/action/command.go index 3fec2c9c..8ae80064 100644 --- a/cmd/micro/action/command.go +++ b/cmd/micro/action/command.go @@ -308,6 +308,15 @@ func (h *BufHandler) ReplaceAllCmd(args []string) { func (h *BufHandler) TermCmd(args []string) { ps := MainTab().Panes + if len(args) == 0 { + sh := os.Getenv("SHELL") + if sh == "" { + InfoBar.Error("Shell environment not found") + return + } + args = []string{sh} + } + term := func(i int) { v := h.GetView() t := new(shell.Terminal)