-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
shell:powershellUser's shell set to powershell.exe (Windows) or pwsh (Unix)User's shell set to powershell.exe (Windows) or pwsh (Unix)windows
Description
Here is a raw display of the error:
The log produced by vim itself shows that the actual command getting execute contains parentheses:
Calling shell to execute: "(cd 'd:\\Users\\t0261309\\DEV_COLLECTION\\vim\\vimfiles\\plugged\\vim-code-dark\\' ; & git rev-list --count --left-right HEAD...origin/master) 2>&1 | Out-File -Encoding UTF8 d:\Users\t0261309\AppData\Local\Temp\V7NC049.tmp"
Based on the source code implementation of s:with_cd()
I can see that for powershell, ;
is used to separate two commands. However, the subsequent vim built-in call system()
will internally add parentheses around the command, and that breaks powershell as a ;
in parentheses is not allowed.
I believe the last E282 error is irrelevant for it is simply because the command is not executed at all and thus no tmp file is created.
A simple fix that I can think of is wrapping the whole cmd with $(...)
, where ;
can live in, and after the system()
wrapping, ($(...;...))
works.
Metadata
Metadata
Assignees
Labels
shell:powershellUser's shell set to powershell.exe (Windows) or pwsh (Unix)User's shell set to powershell.exe (Windows) or pwsh (Unix)windows