From a0ef1e229f20ea97d5538c8c4a8f1b6045af0c0c Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 14 Nov 2021 04:26:25 +0000 Subject: urimatchpairs is new, urigetline got rewritten in C and WEW is it fast now. compare with .sh version. --- urigetline | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 urigetline (limited to 'urigetline') diff --git a/urigetline b/urigetline deleted file mode 100755 index 3f6bb51..0000000 --- a/urigetline +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -uri="$1" -### old way. -# line="$(grep "^${scheme}:" ~/.config/uristart.conf | cut -d: -f2- | sed 's/^[ \t]*//g' | sed 's/\\/\\\\/g')" - -if [ ! "$uristart_config" ];then - uristart_config=~/.config/uristart.conf -fi - -### fancy way. -grep '^[^#]' "$uristart_config" \ - | while read -r l;do - uritmp="$uri" - uritmp="$(printf "%s\n" "$l" \ - | cut -d: -f1 \ - | tr ' ' '\n' \ - | paste '-d ' - - \ - | while read -r a b;do - uritmp="$(printf "%s\n" "${uritmp}" | urimatch "$a" "$b")" - printf "%s\n" "$uritmp" - done | tail -n1)" - if [ "$uritmp" ];then - printf '%s\n' "$l" - break - fi - done \ - | cut -d: -f2- \ - | sed 's/^[ \t]*//g' \ - | sed 's/\\/\\\\/g' -- cgit v1.2.3