diff options
Diffstat (limited to 'gitstatus/gitstatus.plugin.zsh')
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index aa95e408..7ff1a43b 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -3,7 +3,7 @@ # Retrives status of a git repo from a directory under its working tree. # -# -d STR Directory to query. Defaults to $PWD. Must be absolute. +# -d STR Directory to query. Defaults to ${${GIT_DIR:-$PWD}:a}. Must be absolute. # -c STR Callback function to call once the results are available. Called only after # gitstatus_query returns 0 with VCS_STATUS_RESULT=tout. # -t FLOAT Timeout in seconds. Will block for at most this long. If no results are @@ -58,7 +58,7 @@ function gitstatus_query() { setopt err_return no_unset local opt - local dir=$PWD + local dir=${${GIT_DIR:-$PWD}:a} local callback='' local -F timeout=-1 while true; do @@ -215,8 +215,8 @@ function gitstatus_start() { local -i threads=${GITSTATUS_NUM_THREADS:-0} (( threads > 0)) || { case $os in - FreeBSD) threads=$(sysctl -n hw.ncpu);; - *) threads=$(getconf _NPROCESSORS_ONLN);; + FreeBSD) threads=$(( 2 * $(sysctl -n hw.ncpu) ));; + *) threads=$(( 2 * $(getconf _NPROCESSORS_ONLN) ));; esac } |