fix(util.terminal) recorrect the shellredir and shellpip options for

powershell
This commit is contained in:
dbger 2024-06-25 12:18:57 +08:00
parent fb9ba3b725
commit eeea64e22d

View file

@ -29,10 +29,10 @@ function M.setup(shell)
"-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';" "-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';"
-- Setting shell redirection -- Setting shell redirection
vim.o.shellredir = '2>&1 | %{ "$_" } | Out-File %s; exit $LastExitCode' vim.o.shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
-- Setting shell pipe -- Setting shell pipe
vim.o.shellpipe = '2>&1 | %{ "$_" } | Tee-Object %s; exit $LastExitCode' vim.o.shellpipe = '2>&1 | %%{ "$_" } | Tee-Object %s; exit $LastExitCode'
-- Setting shell quote options -- Setting shell quote options
vim.o.shellquote = "" vim.o.shellquote = ""