aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorEnan Ajmain <3nan.ajmain@gmail.com>2022-07-20 01:43:26 +0600
committerEnan Ajmain <3nan.ajmain@gmail.com>2022-09-30 21:07:45 +0600
commitb4d42bb9058308c38e3fe9d59458ce65b3f65eb0 (patch)
tree1a36a320f2a3498c8022e416478bf2e9b56e9c0a /runtime
parentad6af3c1a96f9fae0881c3dcb1f1989531a1073e (diff)
downloadrneovim-b4d42bb9058308c38e3fe9d59458ce65b3f65eb0.tar.gz
rneovim-b4d42bb9058308c38e3fe9d59458ce65b3f65eb0.tar.bz2
rneovim-b4d42bb9058308c38e3fe9d59458ce65b3f65eb0.zip
fix: make_filter_cmd for :! powershell
Problem: `Start-Process` requires the command to be split into the shell command and its arguments. Previously it was done by parsing, which didn't handle cases such as - commands with escaped space in their filepath - quoted commands with space in their filepath Solution: Use - `pwsh -Command` instead of `Start-Process` - `Get-Content` instead of `-RedirectStandardInput` - `Out-File` instead of `-RedirectStandardOutput`
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 836272a60f..5871b82d9c 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5357,7 +5357,7 @@ A jump table for the options with a short description can be found at |Q_op|.
To use PowerShell: >
let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'
- let &shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait'
+ let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
let &shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
set shellquote= shellxquote=