mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
test: "!:&" works with powershell #11201
Removed 'echo' alias because it does not behave like POSIX echo.
This commit is contained in:

committed by
Justin M. Keyes

parent
b772b86d2b
commit
a7fc2f3f64
@@ -502,14 +502,10 @@ end
|
||||
|
||||
function module.set_shell_powershell()
|
||||
local shell = iswin() and 'powershell' or 'pwsh'
|
||||
if not module.eval('executable("'..shell..'")') then
|
||||
error(shell..' is not executable')
|
||||
end
|
||||
local aliases = iswin() and {'cat', 'sleep'} or {}
|
||||
local cmd = ''
|
||||
for _, alias in ipairs(aliases) do
|
||||
cmd = cmd .. 'Remove-Item -Force alias:' .. alias .. ';'
|
||||
end
|
||||
assert(module.eval('executable("'..shell..'")'))
|
||||
local cmd = 'Remove-Item -Force '..table.concat(iswin()
|
||||
and {'alias:cat', 'alias:echo', 'alias:sleep'}
|
||||
or {'alias:echo'}, ',')..';'
|
||||
module.source([[
|
||||
let &shell = ']]..shell..[['
|
||||
set shellquote= shellpipe=\| shellxquote=
|
||||
|
Reference in New Issue
Block a user