diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-10-02 20:51:42 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-10-02 20:51:42 +0300 |
commit | cb14b9dfc8e927743a484d3d1dbf5059deabaa19 (patch) | |
tree | 89ad1481a32554fb7f5f1fab934ca5158c3cc774 /gitstatus/gitstatus.plugin.zsh | |
parent | e5e6249ffd592695ccdb6030a42d3664b3dde480 (diff) |
pull upstream changes from gitstatus
Diffstat (limited to 'gitstatus/gitstatus.plugin.zsh')
-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 55d18a89..4b0ee043 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -316,9 +316,9 @@ function gitstatus_start() { setopt xtrace } - local daemon=${GITSTATUS_DAEMON:-} + local daemon=${GITSTATUS_DAEMON:-} os [[ -n $daemon ]] || { - local os arch + local arch os="$(uname -s)" [[ -n $os ]] [[ $os != Linux || "$(uname -o)" != Android ]] || os=Android @@ -344,6 +344,7 @@ function gitstatus_start() { local -i threads=${GITSTATUS_NUM_THREADS:-0} (( threads > 0)) || { threads=8 + [[ -n $os ]] || { os="$(uname -s)" && [[ -n $os ]] } case $os in FreeBSD) (( ! $+commands[sysctl] )) || threads=$(( 2 * $(sysctl -n hw.ncpu) ));; *) (( ! $+commands[getconf] )) || threads=$(( 2 * $(getconf _NPROCESSORS_ONLN) ));; |