From 1165cd3162a6e9849d5fc9461cb08ef9009b9f13 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 5 Dec 2018 13:28:09 +0100 Subject: fix(osurl): and back to the functional version. --- osurl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 osurl diff --git a/osurl b/osurl old mode 100644 new mode 100755 index 303d45f..e688de2 --- 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])) -- cgit