Skip to content

Commit

Permalink
Merge pull request #178 from jedahan/master
Browse files Browse the repository at this point in the history
Use builtin cd, in case cd::cd has been redefined
  • Loading branch information
sindresorhus committed Dec 4, 2015
2 parents 27e921a + 2fcf525 commit 264658d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ prompt_pure_async_git_dirty() {
local untracked_dirty=$1; shift

# use cd -q to avoid side effects of changing directory, e.g. chpwd hooks
cd -q "$*"
builtin cd -q "$*"

if [[ "$untracked_dirty" == "0" ]]; then
command git diff --no-ext-diff --quiet --exit-code
Expand All @@ -236,7 +236,7 @@ prompt_pure_async_git_dirty() {

prompt_pure_async_git_fetch() {
# 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+)
GIT_TERMINAL_PROMPT=0 command git -c gc.auto=0 fetch
Expand Down

0 comments on commit 264658d

Please sign in to comment.