1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-24 13:10:07 +00:00

prefix all source calls with builtin

This commit is contained in:
Roman Perepelitsa 2020-07-04 07:03:46 +02:00
parent 9486385824
commit 2d74ac9d06
3 changed files with 15 additions and 15 deletions

View file

@ -59,11 +59,11 @@ function p9k_configure() {
_p9k_can_configure || return
(
set -- -f
source $__p9k_root_dir/internal/wizard.zsh
builtin source $__p9k_root_dir/internal/wizard.zsh
)
local ret=$?
case $ret in
0) source $__p9k_cfg_path; _p9k__force_must_init=1;;
0) builtin source $__p9k_cfg_path; _p9k__force_must_init=1;;
69) return 0;;
*) return $ret;;
esac

View file

@ -49,10 +49,10 @@ if ! autoload -Uz is-at-least || ! is-at-least 5.1; then
return 1
fi
source "${__p9k_root_dir}/internal/configure.zsh"
source "${__p9k_root_dir}/internal/worker.zsh"
source "${__p9k_root_dir}/internal/parser.zsh"
source "${__p9k_root_dir}/internal/icons.zsh"
builtin source "${__p9k_root_dir}/internal/configure.zsh"
builtin source "${__p9k_root_dir}/internal/worker.zsh"
builtin source "${__p9k_root_dir}/internal/parser.zsh"
builtin source "${__p9k_root_dir}/internal/icons.zsh"
# For compatibility with Powerlevel9k. It's not recommended to use mnemonic color
# names in the configuration except for colors 0-7 as these are standard.
@ -5623,7 +5623,7 @@ _p9k_set_instant_prompt() {
[[ -n $RPROMPT ]] || unset RPROMPT
}
typeset -gri __p9k_instant_prompt_version=27
typeset -gri __p9k_instant_prompt_version=28
_p9k_dump_instant_prompt() {
local user=${(%):-%n}
@ -5907,7 +5907,7 @@ _p9k_dump_instant_prompt() {
exec 2>&1 {fd_null}>&-
typeset -gi __p9k_instant_prompt_active=1
typeset -g __p9k_instant_prompt_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
if source $__p9k_instant_prompt_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
if builtin source $__p9k_instant_prompt_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
_p9k_preinit
fi
function _p9k_instant_prompt_cleanup() {
@ -6413,12 +6413,12 @@ _p9k_precmd_impl() {
fi
if (( ret == 0 )); then
(
source "$__p9k_root_dir"/internal/wizard.zsh
builtin source "$__p9k_root_dir"/internal/wizard.zsh
)
if (( $? )); then
instant_prompt_disabled=1
else
source "$__p9k_cfg_path"
builtin source "$__p9k_cfg_path"
_p9k__force_must_init=1
_p9k_must_init
fi
@ -8019,7 +8019,7 @@ _p9k_init_vcs() {
(( $+commands[git] )) || { unfunction _p9k_preinit; return 1 }
[[ \$ZSH_VERSION == ${(q)ZSH_VERSION} ]] || return
[[ -r ${(q)gitstatus_dir}/gitstatus.plugin.zsh ]] || return
source ${(q)gitstatus_dir}/gitstatus.plugin.zsh _p9k_ || return
builtin source ${(q)gitstatus_dir}/gitstatus.plugin.zsh _p9k_ || return
GITSTATUS_AUTO_INSTALL=${(q)GITSTATUS_AUTO_INSTALL} \
GITSTATUS_DAEMON=${(q)GITSTATUS_DAEMON} \
GITSTATUS_CACHE_DIR=${(q)GITSTATUS_CACHE_DIR} \
@ -8035,7 +8035,7 @@ _p9k_init_vcs() {
${${_POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS:#0}:+-e} \
-a POWERLEVEL9K
}"
source $gitstatus_dir/gitstatus.plugin.zsh _p9k_ || return
builtin source $gitstatus_dir/gitstatus.plugin.zsh _p9k_ || return
() {
trap 'return 130' INT
{

View file

@ -74,7 +74,7 @@ function _p9k_init_locale() {
done
fi
fi
source $__p9k_root_dir/internal/p10k.zsh || true
builtin source $__p9k_root_dir/internal/p10k.zsh || true
}
(( $+__p9k_instant_prompt_active )) && unsetopt prompt_cr prompt_sp || setopt prompt_cr prompt_sp