mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
fix(windows): treat any non-cmd shell as powershell like in selector
This commit is contained in:
parent
677dd11c6a
commit
273d5e9ac5
1 changed files with 3 additions and 3 deletions
|
|
@ -318,10 +318,10 @@ end
|
||||||
---@return string command
|
---@return string command
|
||||||
function M.make_directory_change_for_command(dir, command)
|
function M.make_directory_change_for_command(dir, command)
|
||||||
if fn.has "win32" == 1 then
|
if fn.has "win32" == 1 then
|
||||||
if vim.o.shell == "powershell" or vim.o.shell == "pwsh" then
|
if string.find(vim.o.shell, "cmd") ~= nil then
|
||||||
return string.format("pushd %s ; %s ; popd", cmdpath(dir), command)
|
|
||||||
else
|
|
||||||
return string.format("pushd %s & %s & popd", cmdpath(dir), command)
|
return string.format("pushd %s & %s & popd", cmdpath(dir), command)
|
||||||
|
else
|
||||||
|
return string.format("pushd %s ; %s ; popd", cmdpath(dir), command)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return string.format("cd %s;\n %s", dir, command)
|
return string.format("cd %s;\n %s", dir, command)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue