diff --git a/lib/git/repo_index.sh b/lib/git/repo_index.sh index 4aa19a7..1e14b0e 100644 --- a/lib/git/repo_index.sh +++ b/lib/git/repo_index.sh @@ -260,13 +260,13 @@ function _git_index_batch_cmd() { unset IFS local base_path for base_path in $(sed -e "s/--.*//" "$GIT_REPO_DIR/.git_index" | grep . | sort); do - if [ -z "$NOCD" ]; then "cd" "$base_path"; fi + builtin cd "$base_path" $@ done else echo "Please give a command to run for all repos. (It may be useful to write your command as a function or script.)" fi - "cd" "$cwd" + builtin cd "$cwd" }