From a33eabddd9f3786421652d07894516d946c88647 Mon Sep 17 00:00:00 2001 From: dbger <3982742+dbger@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:38:11 +0800 Subject: [PATCH] fix(util.terminal): fix the shellredir and shellpipe options for powershell (#3803) ## What is this PR for? fix(util.terminal) recorrect the shellredir and shellpip options for powershell. ## Does this PR fix an existing issue? ## Checklist - [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/util/terminal.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/terminal.lua b/lua/lazyvim/util/terminal.lua index 6d40dc95..598f8ffc 100644 --- a/lua/lazyvim/util/terminal.lua +++ b/lua/lazyvim/util/terminal.lua @@ -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';" -- 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 - vim.o.shellpipe = '2>&1 | %{ "$_" } | Tee-Object %s; exit $LastExitCode' + vim.o.shellpipe = '2>&1 | %%{ "$_" } | Tee-Object %s; exit $LastExitCode' -- Setting shell quote options vim.o.shellquote = ""