Open link functionality not entirely correct
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Terminator |
Fix Released
|
Low
|
Stephen Boddy |
Bug Description
The "open " link functionality in Terminator isn't entirely correct. Probably the regex expression to extract URLs?
For example I have these log lines in the bash
{"level"
{"level"
When I hover the mouse over the https link on the second line, then it opens exactly this URL:
https:/
But I expect it to open that URL
https:/
Brackets are not a valid part of URLs and should be excluded. Can you correct this in the regex?
Thanks
Michael
Related branches
Changed in terminator: | |
status: | Fix Committed → Fix Released |
Actually brackets are valid. See: tools.ietf. org/html/ rfc3986# section- 2.2 tools.ietf. org/html/ rfc3986# section- 3.3
http://
http://
Specifically the sub-delimiter definition:
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
And the pchar (path characters) definition:
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
As far as I've understood, these sub-delimiters are valid in a URL as they are, and optionally can be used as a delimiter on a schema by schema basis, in which case an actual character not being used as a delimiter would be encoded.
Ironically the earlier RFC (http:// tools.ietf. org/html/ rfc1738) superseded by the one above states it more clearly!
"Thus, only alphanumerics, the special characters "$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL."
Curiously gnome-terminal does seems to have removed these from their pattern matching from a quick test, but unless you can point to an authoritative source that clearly contradicts my conclusion, the regex will stay as is.
Perhaps you have the ability to change the log format to use a different bracket? Both square and curly brackets work in Terminator.
I'm marking this as opinion for now, so it can remain open to discuss.