Skip to content
Browse files

Prefer the more precise Github match first.

  • Loading branch information...
1 parent a2005c7 commit 6fb18e4e910c4f3c408165639202e75c321a80b1 @jlouis committed
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/plumbing
View
9 lib/plumbing
@@ -13,13 +13,14 @@ plumb client $editor
# Github
type is text
-data matches 'GH/([a-zA-z]+)/([a-zA-Z_\-]+)'
+data matches 'GH/([a-zA-z]+)/([a-zA-Z_\-]+)#([0-9]+)'
plumb to web
-plumb start web http://github.com/$1/$2
+plumb start web http://github.com/$1/$2/issues/$3
type is text
-data matches 'GH/([a-zA-z]+)/([a-zA-Z_\-]+)#([0-9]+)'
+data matches 'GH/([a-zA-z]+)/([a-zA-Z_\-]+)'
plumb to web
-plumb start web http://github.com/$1/$2/issues/$3
+plumb start web http://github.com/$1/$2
+
include basic

3 comments on commit 6fb18e4

@semka

I'm sorry for break in, but am I understood right: you have a plumber rule that matches string with spaces? I'm trying to create plumber rule to open git commits details from log. It looks like that and doesn't work:

type is text
data matches 'commit ([a-zA-Z¡-�0-9_\-./]+)'
plumb to web
plumb start web $data

(plumbs to web just for debug)

@jlouis
Owner

Hmm, my plumbing rules with spaces in needs you to swipe the text including spaces with mouse 3 to match.

@semka

Thanks, I just found this workaround by myself :)

Please sign in to comment.
Something went wrong with that request. Please try again.