File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,15 @@ function async_run() {
9
9
}&
10
10
}
11
11
12
- function set_git_prompt_dir() {
12
+ function async_run_zsh() {
13
+ {
14
+ eval " $@ " & > /dev/null
15
+ }& !
16
+ }
17
+
18
+
19
+ function git_prompt_dir() {
20
+ # assume the gitstatus.sh is in the same directory as this script
13
21
# code thanks to http://stackoverflow.com/questions/59895
14
22
if [ -z " $__GIT_PROMPT_DIR " ]; then
15
23
__GIT_PROMPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
@@ -441,8 +449,12 @@ function checkUpstream() {
441
449
then
442
450
if [[ -n $( git remote show) ]]; then
443
451
(
444
- async_run " GIT_TERMINAL_PROMPT=0 git fetch --quiet"
445
- disown -h
452
+ if [ -n $ZSH_VERSION ]; then
453
+ async_run_zsh " GIT_TERMINAL_PROMPT=0 git fetch --quiet"
454
+ else
455
+ async_run " GIT_TERMINAL_PROMPT=0 git fetch --quiet"
456
+ disown -h
457
+ fi
446
458
)
447
459
fi
448
460
fi
You can’t perform that action at this time.
0 commit comments