From 4c7f5032af6baca61764cde5122765b2ec684e4a Mon Sep 17 00:00:00 2001 From: Kai Moschcau Date: Tue, 29 Oct 2024 15:36:58 +0100 Subject: docs(options): shell-powershell #30969 `-NonInteractive` at least somewhat hints to pwsh/powershell, that shell sessions created from :! are not interactive, though even that is not foolproof, because powershell is weird. `$PSStyle.OutputRendering='plaintext'` causes pwsh/powershell to omit ANSI escape sequences in its output. --- src/nvim/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/options.lua') diff --git a/src/nvim/options.lua b/src/nvim/options.lua index d59958eaf2..1b8e3ea256 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -7111,7 +7111,7 @@ return { *shell-powershell* To use PowerShell: >vim 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'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;' + let &shellcmdflag = '-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;' let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode' set shellquote= shellxquote= -- cgit