Skip to content

Commit 4b47728

Browse files
committed
expose run shell
1 parent 7056133 commit 4b47728

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

multi-shell.el

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,15 @@
6161
(defvar multi-shell--prevent-nested-kill nil
6262
"Flag to prevent nested kill buffer command.")
6363

64-
(defun multi-shell--run-shell-procss-by-type ()
64+
;;;###autoload
65+
(defun multi-shell-run-shell-procss-by-type ()
6566
"Run the shell process by current type."
6667
(save-window-excursion
6768
(cl-case multi-shell-prefer-shell-type
6869
(`shell (shell))
6970
(`eshell (eshell))
7071
(t (user-error "[ERROR] Invalid shell type: %s" multi-shell-prefer-shell-type)))))
7172

72-
;; XXX: There is a bug when starting `shell' the first time.
73-
(multi-shell--run-shell-procss-by-type)
74-
7573
(defun multi-shell--form-name (base)
7674
"Form the shell name by BASE."
7775
(format "*%s*" base))
@@ -201,7 +199,7 @@
201199
(let* ((id (length multi-shell--live-shells))
202200
(name (multi-shell--form-name-by-id id))
203201
(sh-name (multi-shell--form-name multi-shell-prefer-shell-type)))
204-
(unless (get-buffer sh-name) (multi-shell--run-shell-procss-by-type))
202+
(unless (get-buffer sh-name) (multi-shell-run-shell-procss-by-type))
205203
(with-current-buffer sh-name
206204
(rename-buffer name)
207205
(setq-local truncate-lines nil)

0 commit comments

Comments
 (0)