diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-10-07 22:54:32 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-10-07 22:54:32 +0300 |
commit | 1888d2cee563cdb289d0804143994fb7e429f6b1 (patch) | |
tree | 9089d8a5d6ff35c8bc30ae0ec472c7bd1255f209 | |
parent | 2fd59f5acd332ff64e569e9213d3ded93417aa0f (diff) |
pull upstream changes from gitstatus
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 5 |
1 files 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 ]] |