Merge branch 'osx-shell-client' into develop

This commit is contained in:
ZyX 2014-08-26 19:31:20 +04:00
commit b6e8318ce9
2 changed files with 17 additions and 2 deletions

View File

@ -1,11 +1,21 @@
#!/bin/sh #!/bin/sh
test "${OSTYPE#darwin}" = "${OSTYPE}" && darwin=n || darwin=y
if test "$1" = "--socket" ; then if test "$1" = "--socket" ; then
shift shift
ADDRESS="$1" ADDRESS="$1"
shift shift
else else
ADDRESS="powerline-ipc-${UID:-`id -u`}" ADDRESS="powerline-ipc-${UID:-`id -u`}"
test "$darwin" = y && ADDRESS="/tmp/$ADDRESS"
fi
if test "$darwin" = y; then
ENV=genv
else
ENV=env
ADDRESS="abstract-client:$ADDRESS"
fi fi
# Warning: env -0 does not work in busybox. Consider switching to parsing # Warning: env -0 does not work in busybox. Consider switching to parsing
@ -16,8 +26,8 @@ fi
printf '%s\0' "$argv" printf '%s\0' "$argv"
done done
printf '%s\0' "$PWD" printf '%s\0' "$PWD"
env -0 $ENV -0
) | socat -lf/dev/null -t 10 - abstract-client:"$ADDRESS" ) | socat -lf/dev/null -t 10 - "$ADDRESS"
if test $? -ne 0 ; then if test $? -ne 0 ; then
powerline-render "$@" powerline-render "$@"

View File

@ -17,6 +17,11 @@ Python package
. .
.. note::
In case you want or have to use ``powerline.sh`` socat-based client you
should also install GNU env named ``genv``. This may be achieved by running
``brew install coreutils``.
2. Install Powerline using the following command:: 2. Install Powerline using the following command::
pip install --user git+git://github.com/Lokaltog/powerline pip install --user git+git://github.com/Lokaltog/powerline