aboutsummaryrefslogtreecommitdiffstats
path: root/osurl
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2023-04-15 01:05:35 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-03-28 17:09:18 +0100
commit95190fb81dadde182c8c5aaf0fbcd43714b59749 (patch)
tree04333e704506d71a521d5aa93a7f42fe57eb52ec /osurl
parent6930261dc8380061868c50a9511a55bdf15090e8 (diff)
downloadvim-suse-changes-95190fb81dadde182c8c5aaf0fbcd43714b59749.tar.gz
fix(osurl): make osurl work even inside of the containrised environment.
Diffstat (limited to 'osurl')
-rwxr-xr-xosurl7
1 files changed, 6 insertions, 1 deletions
diff --git a/osurl b/osurl
index 4b934c1..029c87a 100755
--- a/osurl
+++ b/osurl
@@ -89,4 +89,9 @@ if out_url == in_url:lower() then
end
-- print("out_url = " .. out_url)
-os.execute("xdg-open " .. out_url)
+local open_util = "xdg_open "
+if os.execute('type flatpak-xdg-open >/dev/null 2>/dev/null') then
+ open_util = "flatpak-xdg-open "
+end
+
+os.execute(open_util .. out_url)