From 95f93c87d4d9d9b0a3542747de21bc14c0b4316b Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sat, 27 Jun 2020 20:04:10 -0500 Subject: [PATCH] sxmo_appmenu.sh Only ever pick first match in sxmo_appmenu.sh --- scripts/core/sxmo_appmenu.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/core/sxmo_appmenu.sh b/scripts/core/sxmo_appmenu.sh index 19457be..3d0d414 100755 --- a/scripts/core/sxmo_appmenu.sh +++ b/scripts/core/sxmo_appmenu.sh @@ -243,9 +243,9 @@ mainloop() { 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)" + LOOP="$(echo "$PROGCHOICES" | grep -m1 -F "$PICKED" | cut -d '^' -f2)" + CMD="$(echo "$PROGCHOICES" | grep -m1 -F "$PICKED" | cut -d '^' -f3)" + DMENUIDX="$(echo "$PROGCHOICES" | grep -m1 -F -n "$PICKED" | cut -d ':' -f1)" echo "Eval: <$CMD> from picked <$PICKED> with loop <$LOOP>" if echo "$LOOP" | grep 1; then eval "$CMD"