diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-06-06 11:53:41 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-06-06 11:53:41 +0300 |
commit | dd4518bc39af5a11cfdaca5f32ac76a6b42765dc (patch) | |
tree | ddb233b815c04bd6e2f443208d5e2da8ceb7f38f /gitstatus | |
parent | eff8d47b4229fe0a61a2994b9dfa40b0b093acd4 (diff) |
pull upstream changes from gitstatus
Diffstat (limited to '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 64d3f9f4..9a5f5e4f 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -306,9 +306,10 @@ function gitstatus_start() { local -i threads=${GITSTATUS_NUM_THREADS:-0} (( threads > 0)) || { + threads=8 case $os in - FreeBSD) threads=$(( 2 * $(sysctl -n hw.ncpu) ));; - *) threads=$(( 2 * $(getconf _NPROCESSORS_ONLN) ));; + FreeBSD) (( ! $+commands[sysctl] )) || threads=$(( 2 * $(command sysctl -n hw.ncpu) ));; + *) (( ! $+commands[getconf] )) || threads=$(( 2 * $(command getconf _NPROCESSORS_ONLN) ));; esac (( threads <= 32 )) || threads=32 } |