1

Update open-default-shell function

This commit is contained in:
Jessie Hildebrandt 2020-10-17 18:12:40 -04:00
parent 83bd4881fc
commit 9007d032a9

View File

@ -297,9 +297,13 @@
(lisp-interaction-mode)))) (lisp-interaction-mode))))
(defun open-default-shell () (defun open-default-shell ()
"Opens the default system shell in a terminal emulator." "Opens the default system shell in a terminal emulator, opening existing shell session if present."
(interactive) (interactive)
(term shell-file-name)) (if (get-buffer "*terminal*")
(switch-to-buffer "*terminal*")
(progn
(ansi-term shell-file-name)
(rename-buffer "*terminal*"))))
;; Set up all custom bindings (non-package-specific) ;; Set up all custom bindings (non-package-specific)
(bind-keys ([f6] . visual-line-mode) (bind-keys ([f6] . visual-line-mode)