Allow adding matchers
@behdad
Submitted by Behdad Esfahbod Link to original bug (#579859)
Description
I like to be able to configure g-t to link "bug 12345" to http://bugzilla.gnome.org/show_bug.cgi?id=12345
I think we should let people add matchers to a profile. Can have to syntaxes:
- Simple. Using the firefox keyword syntax. That is, you enter the following:
MATCH: bug %s DESTINATION: http://bugzilla.gnome.org/show_bug.cgi?id=%s
Any char after % other than % itself will work. So you can use %1 and %2.0 to match two). Internally we'll rewrite this as a regex. Each %s will match one word according to the currently set word chars. Or something like this.
- Regex. Using captures. So:
MATCH: bug #?([0-9]+) DESTINATION: http://bugzilla.gnome.org/show_bug.cgi?id=\1
The simple case may actually be harder to implement, so we may ditch it.
If multiple matches match, one of the following policies should be used:
- First
- Longest
I think vte does Longest now. Which would be fine.