X-Git-Url: http://git.plutz.net/?p=serve0;a=blobdiff_plain;f=list.sh;h=a2dcd5549e56599a416c670d93fd1c9bb94a61a3;hp=e8b7075f1f889ac3c4527dab07d9e475b4d005d9;hb=5ae0bc5587a5769253c3244ae6a4574f66495376;hpb=ed3fecb0e3063d2812a082ea46afc33bb4b58820 diff --git a/list.sh b/list.sh index e8b7075..a2dcd55 100644 --- a/list.sh +++ b/list.sh @@ -77,9 +77,12 @@ list_filemeta(){ | if [ "$FILTER" ]; then sed -nr "$list_fex" elif [ "${SEARCH#!}" != "${SEARCH}" ]; then - grep -aviE "$(STRING "${SEARCH#!}" |sed -r 's;((^|[^\\])(\\\\)*)\+;\1\\+;g;')" + grep -aviE "$(STRING "${SEARCH#!}" |sed -r ':x s;((^|[^\\])(\\\\)*)\+;\1\\+;g; tx;')" else - grep -aiE "$(STRING "${SEARCH}" |sed -r 's;((^|[^\\])(\\\\)*)\+;\1\\+;g;')" + grep -aiE "$(STRING "${SEARCH}" \ + | sed -r ':x s;((^|[^\\])(\\\\)*)\+;\1 ;g; tx; + s;((^|[^\\])(\\\\)*)\\\+;\1+;g; + s; ;\\+;g;')" fi |cut -f6 | UNSTRING \ | while read -r fn; do printf '%s\n' "${base}/${fn%${CR}}"