mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-22 00:40:23 +00:00
Open default shell if no term args
This commit is contained in:
parent
354c9efc8f
commit
fb3923f344
1 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue