Setting up Powershell as Vim's shell: command does not seem to be passed correctly

Viewed 4320

I am trying to set up Powershell as shell in GVIM on Windows.

When I do :!ls, I get a vimrun.exe window with the command I am running, which seems to be doing nothing. It stays like that until I close it.

vimrun.exe output


My .vimrc configuration:

set shell=powershell
set shellcmdflag=-command
set shellquote=\"
set shellxquote=

Nothing interferes with it: when I do :verbose set shell? shellcmdflag? shellquote? shellxquote? I get the values set above.

When I remove vimrun.exe from %PATH%, I get a Powershell window, which is just empty (no output in it) with same behavior.

The command itself is fine - when I execute it manually from cmd, it works as expected.

When Vim shell is set to cmd, everything works as expected as well.

There are questions that may seem related, but are not same:

1 Answers
Related