From b38ebbeac1caf3b722de584fff728557d94eb38d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 30 Apr 2009 00:27:03 +0200 Subject: [PATCH] awesome-client: use readline and no backslash Signed-off-by: Julien Danjou --- utils/awesome-client | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/utils/awesome-client b/utils/awesome-client index 044ecae3..bb4d61aa 100755 --- a/utils/awesome-client +++ b/utils/awesome-client @@ -3,9 +3,14 @@ # rlwrap provides readline to stuff which doesn't know readline by itself RLWRAP=`which rlwrap 2>/dev/null` -if [ "$RLWRAP" != "" ] && [ "$A_RERUN" = "" ] +if [ "$RLWRAP" != "" ] then - A_RERUN="no" exec $RLWRAP $0 + if [ "$A_RERUN" = "" ] + then + A_RERUN="no" exec $RLWRAP $0 + fi +else + USE_READLINE="-e" fi DBUS_SEND=dbus-send @@ -25,7 +30,7 @@ a_dbus_send() $DBUS_METHOD string:"$1" | tail -n +2 } -while read -p "awesome# " line +while read ${USE_READLINE} -r -p "awesome# " line do a_dbus_send "$line" done