commit fd8ecb12450cd1aa5b8aa8daeaf8053042d32c04 parent 185fdef6f38e046e396da27cdf1aa99237a3b614 Author: Kris Maglione <kris@suckless.org> Date: Fri, 28 May 2010 20:30:20 -0400 Work around a dash bug prematurely killing the event loop. Diffstat:
cmd/wmii.sh.sh | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/cmd/wmii.sh.sh b/cmd/wmii.sh.sh @@ -196,8 +196,13 @@ wi_eventloop() { if [ "$1" = -i ] then cat else wmiir read /event - fi | while read wi_event - do + fi | awk '/./ { print; fflush() } END { print "" }' | + while :; do + # Work around a dash bug. + # Only quit on successful read of a blank line. + read wi_event || continue + test -n "$wi_event" || break + IFS="$wi_newline" wi_arg=$(echo "$wi_event" | sed 's/^[^ ]* //') unset IFS