blob: 9aa979d5f6bfbef59773fd4d134f21daac252e91 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 | -- spellchecker: ignore shellcmdflag shellredir shellpipe shellquote shellxquote
local function setup()
    vim.cmd([[
        let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
        let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
        let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
        let &shellpipe  = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
        set shellquote= shellxquote=
    ]])
    vim.opt.completeslash = 'slash'
end
return {
    setup = setup
}
 |