Fixup url simplifier loop
Now, the loop which successively simplifies the url, always terminates.
This commit is contained in:
parent
ffdc0f664f
commit
497a6e0720
@ -92,7 +92,14 @@ simplify_url() {
|
|||||||
# are found:
|
# are found:
|
||||||
no_entries_found() {
|
no_entries_found() {
|
||||||
while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do
|
while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do
|
||||||
simple_url=$(sed 's,^[^.]*\.,,' <<< "$simple_url")
|
shorter_simple_url=$(sed 's,^[^.]*\.,,' <<< "$simple_url")
|
||||||
|
if [ "$shorter_simple_url" = "$simple_url" ] ; then
|
||||||
|
# if no dot, then even remove the top level domain
|
||||||
|
simple_url=""
|
||||||
|
query_entries "$simple_url"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
simple_url="$shorter_simple_url"
|
||||||
query_entries "$simple_url"
|
query_entries "$simple_url"
|
||||||
#die "No entry found for »$simple_url«"
|
#die "No entry found for »$simple_url«"
|
||||||
# enforce menu if we do "fuzzy" matching
|
# enforce menu if we do "fuzzy" matching
|
||||||
|
Loading…
Reference in New Issue
Block a user