alias urltheme {
var %line = $1-
if ($regex(%line,/(\b(www.?\.|https?:\/\/|ftp:\/\/|unreal://\/\/).)/i)) {
var %x = 1
while (%x <= $numtok(%line,32)) {
if ($regex($gettok(%line,%x,32),/(\b(www.?\.|https?:\/\/|ftp:\/\/|unreal://\/\/).)/i)) {
var %l2 = $+($clr($theme_color(urls)),$chr(31),$gettok(%line,%x,32),$chr(31),$clr)
%line = $puttok(%line,%l2,%x,32)
}
inc %x
}
}
return %line
}