mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-10-14 07:49:09 +00:00
Using builtin cd (#2109)
Using builtin cd to prevent zoxide --cmd=cd conflict cause: zoxide: no match found
This commit is contained in:
committed by
GitHub
parent
6e564503f1
commit
af38394091
2
init.zsh
2
init.zsh
@@ -29,7 +29,7 @@ function zprezto-update {
|
|||||||
printf "running\ncd '%s' and then\n'git pull' " "${ZPREZTODIR}"
|
printf "running\ncd '%s' and then\n'git pull' " "${ZPREZTODIR}"
|
||||||
printf "to manually pull and possibly merge in changes\n"
|
printf "to manually pull and possibly merge in changes\n"
|
||||||
}
|
}
|
||||||
cd -q -- "${ZPREZTODIR}" || return 7
|
builtin cd -q -- "${ZPREZTODIR}" || return 7
|
||||||
local orig_branch="$(git symbolic-ref HEAD 2> /dev/null | cut -d '/' -f 3)"
|
local orig_branch="$(git symbolic-ref HEAD 2> /dev/null | cut -d '/' -f 3)"
|
||||||
if [[ "$orig_branch" == "master" ]]; then
|
if [[ "$orig_branch" == "master" ]]; then
|
||||||
git fetch || return "$?"
|
git fetch || return "$?"
|
||||||
|
Reference in New Issue
Block a user