aboutsummaryrefslogtreecommitdiffstats
path: root/osurl
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2018-12-05 13:28:09 +0100
committerMatěj Cepl <mcepl@cepl.eu>2024-03-28 16:49:18 +0100
commit1165cd3162a6e9849d5fc9461cb08ef9009b9f13 (patch)
tree11c30ed03fa012156a9d5a46f60fd01806e64788 /osurl
parent6e1cde7c8059c60ffed893fc656f0ed92566cc1d (diff)
downloadvim-suse-changes-1165cd3162a6e9849d5fc9461cb08ef9009b9f13.tar.gz
fix(osurl): and back to the functional version.
Diffstat (limited to 'osurl')
-rwxr-xr-x[-rw-r--r--]osurl6
1 files changed, 3 insertions, 3 deletions
diff --git a/osurl b/osurl
index 303d45f..e688de2 100644..100755
--- a/osurl
+++ b/osurl
@@ -1,3 +1,5 @@
+#!/usr/bin/lua
+
local lpeg = require 'lpeg'
local P,C,Cs,Cf,R = lpeg.P, lpeg.C, lpeg.Cs, lpeg.Cf, lpeg.R
@@ -36,6 +38,4 @@ for k,v in pairs(patterns) do
end
local pat = Cs((bugpat + P(1))^0)
-print(pat:match("gh#python/cpython#123"))
-print(pat:match("lp#123456"))
-print(pat:match("bramboříček"))
+os.execute("xdg-open " .. pat:match(arg[1]))