bugfix: windows check for shell option

This commit is contained in:
Baipyrus 2024-06-11 11:50:07 +02:00
parent 2286989640
commit db78ba8f77

View File

@ -8,7 +8,7 @@ vim.api.nvim_exec2('language en_US', {})
-- Shell options -- Shell options
-- Sets the shell to use for system() and ! commands in windows -- Sets the shell to use for system() and ! commands in windows
if vim.fn.has 'win32' and vim.fn.has 'wsl' == 0 then if vim.fn.has 'win32' == 1 and vim.fn.has 'wsl' == 0 then
vim.opt.shell = vim.fn.executable 'pwsh' == 1 and 'pwsh' or 'powershell' vim.opt.shell = vim.fn.executable 'pwsh' == 1 and 'pwsh' or 'powershell'
vim.opt.shellcmdflag = vim.opt.shellcmdflag =
'-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'