From b6db5137fc503ff6c191bed25757d20e5210ad62 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 18 Apr 2009 12:26:31 +0200 Subject: [PATCH] awesome-client: Use rlwrap if it is available This should make this more usable again. The old C version used readline, if possible and now the new bash version does too. :) The idea to use rlwrap is from jd and it's a good one. Signed-off-by: Uli Schlachter --- utils/awesome-client | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/awesome-client b/utils/awesome-client index 4b027cb1..ea3971cb 100755 --- a/utils/awesome-client +++ b/utils/awesome-client @@ -1,5 +1,13 @@ #!/bin/sh +# rlwrap provides readline to stuff which doesn't know readline by itself +RLWRAP=`which rlwrap 2>/dev/null` + +if [ "$RLWRAP" != "" ] && [ "$A_RERUN" = "" ] +then + A_RERUN="no" exec $RLWRAP $0 +fi + DBUS_SEND=dbus-send if ! which ${DBUS_SEND} >/dev/null 2>&1