From 1888d2cee563cdb289d0804143994fb7e429f6b1 Mon Sep 17 00:00:00 2001 From: romkatv Date: Mon, 7 Oct 2019 21:54:32 +0200 Subject: [PATCH] pull upstream changes from gitstatus --- gitstatus/gitstatus.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index 7fc0a58e..21feba53 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -60,6 +60,8 @@ autoload -Uz add-zsh-hook zmodload zsh/datetime zsh/system +typeset -g _gitstatus_plugin_dir=${${(%):-%x}:A:h} + # Retrives status of a git repo from a directory under its working tree. # ## Usage: gitstatus_query [OPTION]... NAME @@ -338,8 +340,7 @@ function gitstatus_start() { os="$(uname -s)" && [[ -n $os ]] [[ $os != Linux || "$(uname -o)" != Android ]] || os=Android local arch && arch="$(uname -m)" && [[ -n $arch ]] - local dir && dir=${${(%):-%x}:A:h} - daemon=$dir/bin/gitstatusd-${os:l}-${arch:l} + daemon=$_gitstatus_plugin_dir/bin/gitstatusd-${os:l}-${arch:l} } [[ -x $daemon ]]