From d9141e1fe6a610117bee1d53b1f0d53920cd9647 Mon Sep 17 00:00:00 2001 From: Johnny Le Date: Sat, 17 Jan 2026 12:38:52 +1100 Subject: [PATCH 1/3] feat(actions): support open link from powershell wsl (#284) --- lua/gitlinker/actions.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/gitlinker/actions.lua b/lua/gitlinker/actions.lua index befca7a..8f07e24 100644 --- a/lua/gitlinker/actions.lua +++ b/lua/gitlinker/actions.lua @@ -16,6 +16,8 @@ local function system(url) vim.fn.jobstart({ "cmd", "/C", "start", url }) elseif vim.fn.executable("wslview") > 0 then vim.fn.jobstart({ "wslview", url }) + elseif vim.fn.executable("powershell.exe") > 0 then + vim.fn.jobstart({ "powershell.exe", "-Command", "Start-Process", url }) else vim.fn.jobstart({ "xdg-open", url }) end From 96cdaf31ef2c6df929c37a34d45285582d085c85 Mon Sep 17 00:00:00 2001 From: Johnny Le Date: Sat, 17 Jan 2026 13:08:07 +1100 Subject: [PATCH 2/3] fix(actions): address review - reorder powershell to take priority on windows --- lua/gitlinker/actions.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/gitlinker/actions.lua b/lua/gitlinker/actions.lua index 8f07e24..617a7e3 100644 --- a/lua/gitlinker/actions.lua +++ b/lua/gitlinker/actions.lua @@ -13,11 +13,13 @@ local function system(url) if vim.fn.has("mac") > 0 then vim.fn.jobstart({ "open", url }) elseif vim.fn.has("win32") > 0 or vim.fn.has("win64") > 0 then - vim.fn.jobstart({ "cmd", "/C", "start", url }) + if vim.fn.executable("powershell.exe") > 0 then + vim.fn.jobstart({ "powershell.exe", "-Command", "Start-Process", url }) + else + vim.fn.jobstart({ "cmd", "/C", "start", url }) + end elseif vim.fn.executable("wslview") > 0 then vim.fn.jobstart({ "wslview", url }) - elseif vim.fn.executable("powershell.exe") > 0 then - vim.fn.jobstart({ "powershell.exe", "-Command", "Start-Process", url }) else vim.fn.jobstart({ "xdg-open", url }) end From 378f3ba506a4a168e58e91481b763418272bb037 Mon Sep 17 00:00:00 2001 From: Johnny Le Date: Sat, 17 Jan 2026 14:18:21 +1100 Subject: [PATCH 3/3] fix(actions): revert to using cmd - adding wsl check in windows block --- lua/gitlinker/actions.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lua/gitlinker/actions.lua b/lua/gitlinker/actions.lua index 617a7e3..a4f82ad 100644 --- a/lua/gitlinker/actions.lua +++ b/lua/gitlinker/actions.lua @@ -12,12 +12,8 @@ end local function system(url) if vim.fn.has("mac") > 0 then vim.fn.jobstart({ "open", url }) - elseif vim.fn.has("win32") > 0 or vim.fn.has("win64") > 0 then - if vim.fn.executable("powershell.exe") > 0 then - vim.fn.jobstart({ "powershell.exe", "-Command", "Start-Process", url }) - else - vim.fn.jobstart({ "cmd", "/C", "start", url }) - end + elseif vim.fn.has("win32") > 0 or vim.fn.has("win64") > 0 or vim.fn.has('wsl') > 0 then + vim.fn.jobstart({ "cmd.exe", "/C", "start", url }) elseif vim.fn.executable("wslview") > 0 then vim.fn.jobstart({ "wslview", url }) else