aboutsummaryrefslogtreecommitdiffstats
path: root/osurl
diff options
context:
space:
mode:
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)