asynctasks.vim icon indicating copy to clipboard operation
asynctasks.vim copied to clipboard

PowerShell of Windows is not supported

Open chrisniael opened this issue 4 years ago • 0 comments

I set PowerShell as the default shell of vim in Windows

if has("win32")
  let &shell='pwsh'
  let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'
  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=
endif

My task.ini config

[gen-pb]
command=.\gen_pb.bat
cwd=$(VIM_ROOT)\tools
output=terminal
save=1

The task is to run $(VIM_ROOT)\toos\gen_pb.bat

Output:

❯ cd /D "C:\Users\shenyu\Documents\work\superWarServer\game\tools"
Set-Location: A positional parameter cannot be found that accepts argument 'C:\Users\shenyu\Documents\work\superWarServer\game\tools'.

I'm guessing cd /D is a CMD command, not PowerShell.

chrisniael avatar Feb 23 '22 07:02 chrisniael