From f5ed3cb4477c4f7db6352f82b39f98b217d559d8 Mon Sep 17 00:00:00 2001 From: James Dixon Date: Thu, 8 May 2025 19:21:16 -0400 Subject: [PATCH] Use powershell on windows --- config/emacs/.config/emacs/init.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/emacs/.config/emacs/init.el b/config/emacs/.config/emacs/init.el index 6e04245..6b77fcc 100644 --- a/config/emacs/.config/emacs/init.el +++ b/config/emacs/.config/emacs/init.el @@ -624,6 +624,18 @@ (if (eq system-type 'windows-nt) (set-frame-font "Cascadia Code 12" nil t)) +;; on windows, make pwsh the default shell +(when (eq system-type 'windows-nt) + (let ((xlist + '( + "C:/Program Files/PowerShell/7/pwsh.exe" + "~/AppData/Local/Microsoft/WindowsApps/pwsh.exe" + "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" + )) + xfound) + (setq xfound (seq-some (lambda (x) (if (file-exists-p x) x nil)) xlist)) + (when xfound (setq explicit-shell-file-name xfound)))) + ;; Have to change emacs init dir for Windows ;; https://emacs.stackexchange.com/a/12886 ;; (setenv "HOME" "C:/Users/itzja")