From 26d8ff0ba617dc7a4ea3d5c93ce5628e23be6724 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sat, 27 Jun 2020 20:01:40 -0500 Subject: [PATCH] sxmo_appmenu.sh: Never literal string grep match on empty string --- scripts/core/sxmo_appmenu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/core/sxmo_appmenu.sh b/scripts/core/sxmo_appmenu.sh index fbedb6a..19457be 100755 --- a/scripts/core/sxmo_appmenu.sh +++ b/scripts/core/sxmo_appmenu.sh @@ -242,6 +242,7 @@ mainloop() { cut -d'^' -f1 | dmenu -idx "$DMENUIDX" -l 14 -c -fn "Terminus-30" -p "$WINNAME" | ( PICKED="$(cat)" + echo "$PICKED" | grep . || quit LOOP="$(echo "$PROGCHOICES" | grep -F "$PICKED" | cut -d '^' -f2)" CMD="$(echo "$PROGCHOICES" | grep -F "$PICKED" | cut -d '^' -f3)" DMENUIDX="$(echo "$PROGCHOICES" | grep -F -n "$PICKED" | cut -d ':' -f1)"