mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-05 22:50:21 +09:00
Open default shell if no term args
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user