From 1ed6b90d975c1139b73597841e57fe379b2e6cdb Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 18 Jun 2020 02:14:04 +0200 Subject: fix(osurl): don't lower-case all URLs. --- osurl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'osurl') 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) -- cgit