Eshell: Include "M-x shell"s in the switcher, and offer to spawn new ones
parent
4613fb6bcd
commit
fcce215ec8
|
@ -257,11 +257,22 @@ This should be faster then `seq-uniq'."
|
|||
"Eshell"
|
||||
(lambda (b)
|
||||
(with-current-buffer b
|
||||
(derived-mode-p 'eshell-mode)))
|
||||
(or
|
||||
(derived-mode-p 'eshell-mode)
|
||||
(derived-mode-p 'shell-mode))))
|
||||
(lambda (&optional name)
|
||||
;; TODO: Could add an option "prefer-eshell" to choose between Eshell/Shell by default.
|
||||
(eshell 'new)
|
||||
(when name
|
||||
(rename-buffer (format "*eshell<%s>*" name) 'unique)))))
|
||||
(rename-buffer (format "*eshell<%s>*" name) 'unique)))
|
||||
nil
|
||||
(helm-build-dummy-source
|
||||
"Create shell buffer"
|
||||
:action `(("Create shell buffer" .
|
||||
(lambda (candidate)
|
||||
(let ((new-buffer (save-window-excursion (shell (format "*shell<%s>*" candidate))
|
||||
(current-buffer))))
|
||||
(switch-to-buffer new-buffer))))))))
|
||||
|
||||
;;; Auto-suggestion
|
||||
(when (require 'esh-autosuggest nil t)
|
||||
|
|
Loading…
Reference in New Issue