diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/shell_command_selectors.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index e90cb81c9..cf99a01d7 100644 --- a/lua/nvim-treesitter/shell_command_selectors.lua +++ b/lua/nvim-treesitter/shell_command_selectors.lua @@ -318,10 +318,10 @@ end ---@return string command function M.make_directory_change_for_command(dir, command) if fn.has "win32" == 1 then - if vim.o.shell == "powershell" or vim.o.shell == "pwsh" then - return string.format("pushd %s ; %s ; popd", cmdpath(dir), command) - else + 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) end else return string.format("cd %s;\n %s", dir, command) |
