diff options
author | John <john@ankarstrom.se> | 2019-06-04 20:32:55 +0200 |
---|---|---|
committer | John <john@ankarstrom.se> | 2019-06-04 20:32:55 +0200 |
commit | 08d83595dd729ca42ab1746bc5b7744e99eec1aa (patch) | |
tree | 31270f588953374ac4325f67fb2fa8ae90b54a42 | |
parent | f09d47769022a0eeebc63e1678d60832a8c43b73 (diff) | |
download | dwim-08d83595dd729ca42ab1746bc5b7744e99eec1aa.tar.gz |
fix http/mailto regexes
-rwxr-xr-x | dwim | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,12 +22,12 @@ my $MAILROOT = env MAILROOT => "/home/john/mail/"; our $handler; for ($phrase) { - if (/^(https?:\/\/.+)$/) { + if (/^(https?:\/?\/?.+)$/) { handle "web address"; exec "firefox", "$1" } - if (/^(mailto:\/\/.+)$/ or /^(.+@.+\.\w+)$/) { + if (/^(mailto:.+)$/ or /^(.+@.+\.\w+)$/) { handle "e-mail address"; exec @MAILER, "$1" } |