Dear Maintainer,
urlview does not work with URLs containing parentheses.
To reproduce:
$ echo "https://en.wikipedia.org/wiki/Close_Combat_(series)" > test.txt
$ urlview test.txt
You will get a single selection:
-> 1 https://en.wikipedia.org/wiki/Close_Combat_(series
Notice the missing ‘)’ at the end.
A workaround is to `cp /etc/urlview/system.urlview ~/.urlview` and
then replace REGEXP with
REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;\t\n\r<">\):]?[^, <>"\t]*[^ .,;\t\n\r<">:]
(i.e. erasing that last “\)”).
I would send a patch but am not a regexp expert — nor I understood where
upstream repository is —, so I am not 100% sure the modification is sensible.
This is quite detrimental to the very common case of a URL that's
entirely parenthesised, or one that ends a parenthetical; compare:
$ tail -n3 text
Debian#1035358: https://en.wikipedia.org/wiki/Close_Combat_(series)
vs (https://en.wikipedia.org/wiki/Debian)
vs https://en.wikipedia.org/wiki/(You_Gotta)_Fight_for_Your_Right_(To_Party!)
$ grep -Eio '((http|https|ftp|gopher|gemini|mailto):(//)?[^ <>"]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;<">\):]?[^, <>"]*[^ .,;<">:\)]' text | tail -n3
https://en.wikipedia.org/wiki/Close_Combat_(series
https://en.wikipedia.org/wiki/Debian
https://en.wikipedia.org/wiki/(You_Gotta)_Fight_for_Your_Right_(To_Party!
$ grep -Eio '((http|https|ftp|gopher|gemini|mailto):(//)?[^ <>"]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;<">\):]?[^, <>"]*[^ .,;<">:]' text | tail -n3
https://en.wikipedia.org/wiki/Close_Combat_(series)
https://en.wikipedia.org/wiki/Debian)
https://en.wikipedia.org/wiki/(You_Gotta)_Fight_for_Your_Right_(To_Party!)
so this trivial solution fixes an IME rare case of an URL ending with a ')'
by breaking the much more common one.
It is quite likely something /can/ be cooked here,
I haven't managed to in a good few minutes of fiddling.
Attaching my test driver.
Best,
наб