I want to use !
with powershell. I use neovim natively on windows.
I tried these settings
set shell=powershell.exe
set shellcmdflag=-NoProfile\ -NoLogo\ -NonInteractive\ -Command
set shellpipe=|
set shellredir=>
as suggested here https://robindouglas.uk/powershell/vim/2018/04/05/PowerShell-with-Vim.html
They don't work (having nvim -u NONE
from cmd or neovim-qt).
They simply return the same command I typed.
I tried using this and additionally, set set shellquote=\"
I get on !ls
:
+ ""ls""
+ ~~~~
Unexpected token 'ls""' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
:set verbose=5
and see what actual command is executed by Vim. BTW: vimhelp.org/os_dos.txt.html#dos-powershell