aboutsummaryrefslogtreecommitdiffstats
path: root/osurl
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2020-06-18 02:14:04 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-03-28 17:00:57 +0100
commit1ed6b90d975c1139b73597841e57fe379b2e6cdb (patch)
tree42bae3153a8e3b524310d9a7bd76c6f225c3e8b4 /osurl
parentcc98051a784985a03aa0fdaed59d5a29994bc742 (diff)
downloadvim-suse-changes-1ed6b90d975c1139b73597841e57fe379b2e6cdb.tar.gz
fix(osurl): don't lower-case all URLs.
Diffstat (limited to 'osurl')
-rwxr-xr-xosurl8
1 files changed, 7 insertions, 1 deletions
diff --git a/osurl b/osurl
index fcbf9a9..87f9e5e 100755
--- a/osurl
+++ b/osurl
@@ -52,4 +52,10 @@ for k,v in pairs(patterns) do
end
local pat = Cs((bugpat + P(1))^0)
-os.execute("xdg-open " .. pat:match(arg[1]:lower()))
+local in_url = arg[1]
+local out_url = pat:match(in_url:lower())
+if out_url == in_url:lower() then
+ out_url = in_url
+end
+
+os.execute("xdg-open " .. out_url)