From d9f78b63361e00a7f623ebb5b869606ac653b180 Mon Sep 17 00:00:00 2001 From: T727 <74924917+T-727@users.noreply.github.com> Date: Sat, 22 Apr 2023 13:04:05 +0300 Subject: docs(powershell): use tee.exe instead of Tee-Object Problem: Tee-Object does not create a file if it does not receive input for example when :grep does not find matches. and so nvim tries to open a nonexistent errorfile causing an error. Solution: use tee.exe instead of Tee-Object --- runtime/doc/options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 7842394245..46d3f153c2 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5225,9 +5225,9 @@ A jump table for the options with a short description can be found at |Q_op|. *shell-powershell* To use PowerShell: > let &shell = executable('pwsh') ? 'pwsh' : 'powershell' - let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';' + let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;' let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' - let &shellpipe = '2>&1 | %%{ "$_" } | Tee-Object %s; exit $LastExitCode' + let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode' set shellquote= shellxquote= < This option cannot be set from a |modeline| or in the |sandbox|, for -- cgit