Use builtin cd, in case cd::cd has been redefined

This commit is contained in:
Jonathan Dahan
2015-12-02 16:21:05 -05:00
parent 27e921a0be
commit 2fcf5251b4

View File

@@ -223,7 +223,7 @@ prompt_pure_async_git_dirty() {
local untracked_dirty=$1; shift local untracked_dirty=$1; shift
# use cd -q to avoid side effects of changing directory, e.g. chpwd hooks # use cd -q to avoid side effects of changing directory, e.g. chpwd hooks
cd -q "$*" builtin cd -q "$*"
if [[ "$untracked_dirty" == "0" ]]; then if [[ "$untracked_dirty" == "0" ]]; then
command git diff --no-ext-diff --quiet --exit-code command git diff --no-ext-diff --quiet --exit-code
@@ -236,7 +236,7 @@ prompt_pure_async_git_dirty() {
prompt_pure_async_git_fetch() { prompt_pure_async_git_fetch() {
# use cd -q to avoid side effects of changing directory, e.g. chpwd hooks # use cd -q to avoid side effects of changing directory, e.g. chpwd hooks
cd -q "$*" builtin cd -q "$*"
# set GIT_TERMINAL_PROMPT=0 to disable auth prompting for git fetch (git 2.3+) # set GIT_TERMINAL_PROMPT=0 to disable auth prompting for git fetch (git 2.3+)
GIT_TERMINAL_PROMPT=0 command git -c gc.auto=0 fetch GIT_TERMINAL_PROMPT=0 command git -c gc.auto=0 fetch