From 2ecf549d5c65194d7400bb974e329b5655df1c06 Mon Sep 17 00:00:00 2001 From: tsukimizake Date: Sat, 25 Oct 2025 17:51:58 +0900 Subject: [PATCH] Fix git command for nushell compatibility Replace 'cd && git' with 'git -C' to avoid issues with nushell which doesn't support command substitution with cd in the same way as bash/zsh. --- lua/copilot/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/copilot/util.lua b/lua/copilot/util.lua index 8d82f21c..b636c130 100644 --- a/lua/copilot/util.lua +++ b/lua/copilot/util.lua @@ -33,7 +33,7 @@ function M.get_copilot_lua_version() if not copilot_lua_version then local plugin_version_ok, plugin_version = pcall(function() local plugin_dir = M.get_plugin_path() - return vim.fn.systemlist(string.format("cd %s && git rev-parse HEAD", plugin_dir))[1] + return vim.fn.systemlist(string.format("git -C %s rev-parse HEAD", plugin_dir))[1] end) copilot_lua_version = plugin_version_ok and plugin_version or "dev" end