Skip to content

Commit

Permalink
refactor: don't support powershell in pop-shell.
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed Sep 19, 2023
1 parent 64e18c4 commit 6470da3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
1 change: 1 addition & 0 deletions lisp/init-prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ Install the doc if it's not installed."
(use-package julia-mode)
(use-package lua-mode)
(use-package mermaid-mode)
(use-package powershell)
(use-package scala-mode)
(use-package swift-mode)
(use-package v-mode)
Expand Down
16 changes: 0 additions & 16 deletions lisp/init-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,6 @@
(pop-to-buffer vterm-buffer)))
(advice-add #'multi-vterm :override #'my-multi-vterm))))

;; Powershell
(use-package powershell
:init
(defun powershell (&optional buffer)
"Launches a powershell in buffer *powershell* and switches to it."
(interactive)
(let ((buffer (or buffer "*powershell*"))
(program (if (executable-find "pwsh") "pwsh" "powershell")))
(make-comint-in-buffer "Powershell" buffer program nil "-NoProfile")
(with-current-buffer buffer
(setq-local mode-line-format nil)
(and (bound-and-true-p corfu-mode) (corfu-mode -1)))
(pop-to-buffer buffer))))

;; Shell Pop: leverage `popper'
(with-no-warnings
(defvar shell-pop--frame nil)
Expand All @@ -156,8 +142,6 @@
(defun shell-pop--shell (&optional arg)
"Run shell and return the buffer."
(cond ((fboundp 'vterm) (vterm arg))
((or (executable-find "pwsh") (executable-find "powershell"))
(powershell arg))
(sys/win32p (eshell arg))
(t (shell))))

Expand Down

0 comments on commit 6470da3

Please sign in to comment.