From e5485ee44c6a0513316ae354ad4c927bf58172e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Sat, 22 Apr 2023 23:37:37 +0800 Subject: [PATCH] fix(core): update shell cmds for windows PowerShell --- lua/core/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 1f0d7d769..329a8ba7d 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -123,16 +123,16 @@ local shell_config = function() Failed to setup terminal config PowerShell is either not installed, missing from PATH, or not executable; -cmd.exe will be used instead for `:!` (shell bang). +cmd.exe will be used instead for `:!` (shell bang) and toggleterm.nvim. -You're recommended to install Windows PowerShell for better experience.]], +You're recommended to install PowerShell for better experience.]], vim.log.levels.WARN, { title = "[core] Runtime error" } ) return end - local basecmd = "-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned" + local basecmd = "-NoLogo -NoExit -ExecutionPolicy RemoteSigned" local ctrlcmd = "-Command $OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding" vim.api.nvim_set_option_value("shell", vim.fn.executable("pwsh") and "pwsh" or "powershell", {})