Use arithmetic evaluation to test git pull flag

Closes #37
This commit is contained in:
patrick brisbin
2013-10-30 16:19:57 +00:00
committed by Sindre Sorhus
parent 259a72c53b
commit b8a33ba6ba
2 changed files with 2 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ prompt_pure_precmd() {
print -P $prompt_pure_preprompt print -P $prompt_pure_preprompt
# check async if there is anything to pull # check async if there is anything to pull
[[ -z $PURE_GIT_PULL || $PURE_GIT_PULL == true ]] && { (( ${PURE_GIT_PULL:-1} )) && {
# check if we're in a git repo # check if we're in a git repo
command git rev-parse --is-inside-work-tree &>/dev/null && command git rev-parse --is-inside-work-tree &>/dev/null &&
# check check if there is anything to pull # check check if there is anything to pull

View File

@@ -56,7 +56,7 @@ The max execution time of a process before its run time is shown when it exits.
### `PURE_GIT_PULL` ### `PURE_GIT_PULL`
Set `PURE_GIT_PULL=false` to prevent Pure from checking whether the current Git remote has been updated. Set `PURE_GIT_PULL=0` to prevent Pure from checking whether the current Git remote has been updated.
## Example ## Example