Open default shell if no term args

This commit is contained in:
Zachary Yedidia
2019-01-12 22:58:16 -05:00
parent 354c9efc8f
commit fb3923f344

View File

@@ -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)