summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfilebrowser/backend-gopher.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/filebrowser/backend-gopher.sh b/filebrowser/backend-gopher.sh
index 54b39c5..e606667 100755
--- a/filebrowser/backend-gopher.sh
+++ b/filebrowser/backend-gopher.sh
@@ -11,5 +11,9 @@ while true;do
printf '%s\n' "$selection" | ncat "$server" "$port" | tee /dev/stderr | grep -v ^i | cut -f2 | tr -d '\r'
### need to ask user for input in the form of a pop-up window if the selected target was of type 7
read -r selection
+ if [ "_" = "_$selection" ];then
+ echo "looks like there's nothing here. exiting." >&2
+ exit 1
+ fi
echo
done