fix(terminal): set shellcmdflags for powershell to recommended values. Closes #4805

This commit is contained in:
Folke Lemaitre
2024-11-16 07:39:48 +01:00
parent 1c5a330b6b
commit 1db2af267e

View File

@ -18,13 +18,13 @@ function M.setup(shell)
-- Setting shell command flags -- Setting shell command flags
vim.o.shellcmdflag = vim.o.shellcmdflag =
"-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';" "-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';$PSStyle.OutputRendering='plaintext';Remove-Alias -Force -ErrorAction SilentlyContinue tee;"
-- 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 %s; exit $LastExitCode'
-- Setting shell quote options -- Setting shell quote options
vim.o.shellquote = "" vim.o.shellquote = ""