Also consider `"' as possible delimeters. - plumb - Open certain URL patterns with an ad-hoc opener (plumber)
(HTM) hg clone https://bitbucket.org/iamleot/plumb
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) changeset a18553b8370354a883dbe25f06608b2de684b741
(DIR) parent d219d62a7319b97d1432b1d9110fbb028095ed50
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Sat, 24 Mar 2018 20:27:23
Also consider `"' as possible delimeters.
Diffstat:
dplumb | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff -r d219d62a7319 -r a18553b83703 dplumb
--- a/dplumb Sat Mar 24 19:43:06 2018 +0100
+++ b/dplumb Sat Mar 24 20:27:23 2018 +0100
@@ -38,10 +38,11 @@
awk \
'
/:\/\// {
- # Get rid of possible delimiters (<...>, (...), [...])
+ # Get rid of possible delimiters (<...>, (...), [...], "...")
if (match($0, /\<[[:alnum:]]+:\/\/[^>]+\>/) ||
match($0, /\([[:alnum:]]+:\/\/[^)]+\)/) ||
- match($0, /\[[[:alnum:]]+:\/\/[^]]+\]/)) {
+ match($0, /\[[[:alnum:]]+:\/\/[^]]+\]/) ||
+ match($0, /"[[:alnum:]]+:\/\/[^]]+"/)) {
print substr($0, RSTART + 1, RLENGTH - 2)
} else {
print $0