diff options
author | Case Duckworth | 2020-06-08 15:37:29 -0500 |
---|---|---|
committer | Case Duckworth | 2020-06-08 15:37:29 -0500 |
commit | b5e61bcf2f58fe5041cee2b7a848378a4297c9ea (patch) | |
tree | 889309bf066700e5ce3d3476c8105aba50c3eac6 | |
parent | Implement 'sleep' as a builtin (diff) | |
download | bollux-b5e61bcf2f58fe5041cee2b7a848378a4297c9ea.tar.gz bollux-b5e61bcf2f58fe5041cee2b7a848378a4297c9ea.zip |
Reload page if no links
-rwxr-xr-x | bollux | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bollux b/bollux index 1378961..ed84894 100755 --- a/bollux +++ b/bollux | |||
@@ -923,6 +923,11 @@ handle_keypress() { # handle_keypress CODE | |||
923 | # select a URL from a text/gemini file | 923 | # select a URL from a text/gemini file |
924 | select_url() { # select_url FILE | 924 | select_url() { # select_url FILE |
925 | run mapfile -t < <(extract_links <"$1") | 925 | run mapfile -t < <(extract_links <"$1") |
926 | if ((${#MAPFILE[@]} == 0)); then | ||
927 | log e "No links on this page!" | ||
928 | sleep 0.5 | ||
929 | run blastoff "$BOLLUX_URL" | ||
930 | fi | ||
926 | PS3="OPEN> " | 931 | PS3="OPEN> " |
927 | select u in "${MAPFILE[@]}"; do | 932 | select u in "${MAPFILE[@]}"; do |
928 | case "$REPLY" in | 933 | case "$REPLY" in |