From 5431cbf4ecbcb9594c12f31265e2a7a41fdc5272 Mon Sep 17 00:00:00 2001 From: Tom Lebreux Date: Thu, 30 May 2024 23:16:44 -0400 Subject: [PATCH] Try to support macOS I don't have one so hard to tell whether it works. --- lua/repo-url/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/repo-url/init.lua b/lua/repo-url/init.lua index 6d21566..9c5a077 100644 --- a/lua/repo-url/init.lua +++ b/lua/repo-url/init.lua @@ -499,7 +499,11 @@ local clipboard_url = function(url) end local open_url = function(url) - vim.fn.system('xdg-open ' .. url) + if vim.loop.os_uname().sysname == 'Darwin' then + vim.fn.system('open' .. url) + else + vim.fn.system('xdg-open ' .. url) + end vim.print(string.format("Opened URL '%s' in the browser", url)) end -- 2.45.2