mirror of
https://github.com/zplug/zplug
synced 2025-04-30 13:17:57 +02:00
Merge branch 'master' into new-spinners
This commit is contained in:
commit
bce88181aa
@ -113,7 +113,6 @@ else
|
||||
fi
|
||||
|
||||
dq='"'
|
||||
dq="$(print -nP -- "%F{000}$dq%f")"
|
||||
for copy in "${(k)copy_zplugs[@]}"
|
||||
do
|
||||
tag="nil"
|
||||
|
@ -106,6 +106,8 @@ __zplug::core::cache::commit()
|
||||
__zplug::core::cache::diff()
|
||||
{
|
||||
local key file
|
||||
local is_verbose
|
||||
zstyle -s ':zplug:core:load' 'verbose' is_verbose
|
||||
|
||||
$ZPLUG_USE_CACHE || return 2
|
||||
|
||||
@ -118,7 +120,9 @@ __zplug::core::cache::diff()
|
||||
case $status in
|
||||
0)
|
||||
# same
|
||||
print -P "[zplug] %F{202}Load from cache ($ZPLUG_CACHE_DIR)%f"
|
||||
if (( $_zplug_boolean_true[(I)$is_verbose] )); then
|
||||
__zplug::io::print::f --zplug "Loaded from cache ($ZPLUG_CACHE_DIR)\n"
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
1)
|
||||
|
@ -244,7 +244,7 @@ __zplug::core::core::variable()
|
||||
--die \
|
||||
--zplug \
|
||||
--warn \
|
||||
"ZPLUG_SHALLOW is deprecated." \
|
||||
"ZPLUG_SHALLOW is deprecated. " \
|
||||
"Please use 'zstyle :zplug:tag depth 1' instead.\n"
|
||||
fi
|
||||
|
||||
@ -253,7 +253,7 @@ __zplug::core::core::variable()
|
||||
--die \
|
||||
--zplug \
|
||||
--warn \
|
||||
"ZPLUG_CACHE_FILE is deprecated." \
|
||||
"ZPLUG_CACHE_FILE is deprecated. " \
|
||||
"Please use 'ZPLUG_CACHE_DIR' instead.\n"
|
||||
fi
|
||||
|
||||
@ -262,7 +262,7 @@ __zplug::core::core::variable()
|
||||
--die \
|
||||
--zplug \
|
||||
--warn \
|
||||
"ZPLUG_CLONE_DEPTH is deprecated." \
|
||||
"ZPLUG_CLONE_DEPTH is deprecated. " \
|
||||
"Please use 'zstyle :zplug:tag depth $ZPLUG_CLONE_DEPTH' instead.\n"
|
||||
fi
|
||||
|
||||
|
@ -35,11 +35,11 @@ __zplug::core::load::from_cache()
|
||||
}
|
||||
|
||||
if [[ -s $_zplug_cache[failed_repos] ]]; then
|
||||
# If there are repos failed to load,
|
||||
# If there are repos that failed to load,
|
||||
# show those repos and return false
|
||||
__zplug::io::print::f \
|
||||
--zplug \
|
||||
"These repos are failed to load:\n$fg_bold[red]"
|
||||
"These repos have failed to load:\n$fg_bold[red]"
|
||||
sed -e 's/^/- /g' "$_zplug_cache[failed_repos]"
|
||||
__zplug::io::print::f "$reset_color"
|
||||
return 1
|
||||
@ -86,9 +86,9 @@ __zplug::core::load::as_plugin()
|
||||
|
||||
if (( $_zplug_boolean_true[(I)$is_verbose] )); then
|
||||
if (( $status_code == 0 )); then
|
||||
print -nP -- " %F{148}$msg %F{15}${(qqq)load_path/$HOME/~}%f ($repo)\n"
|
||||
__zplug::io::print::f " $msg ${(qqq)load_path/$HOME/~} ($repo)\n"
|
||||
else
|
||||
print -nP -- " %F{5}Failed to load %F{15}${(qqq)load_path/$HOME/~}%f ($repo)\n"
|
||||
__zplug::io::print::f --warn " Failed to load ${(qqq)load_path/$HOME/~} ($repo)\n"
|
||||
fi
|
||||
fi
|
||||
if (( $status_code == 0 )); then
|
||||
@ -139,9 +139,9 @@ __zplug::core::load::as_command()
|
||||
|
||||
if (( $_zplug_boolean_true[(I)$is_verbose] )); then
|
||||
if (( $status_code == 0 )); then
|
||||
print -nP -- " %F{148}Link %F{15}${(qqq)load_path/$HOME/~}%f ($repo)\n"
|
||||
__zplug::io::print::f " Link ${(qqq)load_path/$HOME/~} ($repo)\n"
|
||||
else
|
||||
print -nP -- " %F{5}Failed to link %F{15}${(qqq)load_path/$HOME/~}%f ($repo)\n"
|
||||
__zplug::io::print::f --warn " Failed to link ${(qqq)load_path/$HOME/~} ($repo)\n"
|
||||
fi
|
||||
fi
|
||||
if (( $status_code == 0 )); then
|
||||
|
@ -81,13 +81,15 @@ __zplug::utils::git::checkout()
|
||||
{
|
||||
local repo="$1"
|
||||
local -a do_not_checkout
|
||||
local -a ignore_checkout_errors
|
||||
local -A tags
|
||||
|
||||
tags[at]="$(__zplug::core::core::run_interfaces 'at' "$repo")"
|
||||
tags[dir]="$(__zplug::core::core::run_interfaces 'dir' "$repo")"
|
||||
tags[from]="$(__zplug::core::core::run_interfaces 'from' "$repo")"
|
||||
|
||||
do_not_checkout=( "gh-r" "prezto" )
|
||||
do_not_checkout=( "gh-r" )
|
||||
ignore_checkout_errors=( "prezto" "oh-my-zsh" )
|
||||
if [[ ! -d $tags[dir]/.git ]]; then
|
||||
do_not_checkout+=( "local" )
|
||||
fi
|
||||
|
@ -5,9 +5,9 @@ __zplug::utils::releases::get_latest()
|
||||
|
||||
url="https://github.com/$repo/releases/latest"
|
||||
if (( $+commands[curl] )); then
|
||||
cmd="curl -fsSL"
|
||||
cmd="command curl -fsSL"
|
||||
elif (( $+commands[wget] )); then
|
||||
cmd="wget -qO -"
|
||||
cmd="command wget -qO -"
|
||||
fi
|
||||
|
||||
eval "$cmd $url" \
|
||||
@ -105,9 +105,9 @@ __zplug::utils::releases::get_url()
|
||||
|
||||
url="https://github.com/$repo/releases/$tags[at]"
|
||||
if (( $+commands[curl] )); then
|
||||
cmd="curl -fsSL"
|
||||
cmd="command curl -fsSL"
|
||||
elif (( $+commands[wget] )); then
|
||||
cmd="wget -qO -"
|
||||
cmd="command wget -qO -"
|
||||
fi
|
||||
|
||||
candidates=(
|
||||
@ -160,9 +160,9 @@ __zplug::utils::releases::get()
|
||||
artifact="${url:t}"
|
||||
|
||||
if (( $+commands[curl] )); then
|
||||
cmd="curl -s -L -O"
|
||||
cmd="command curl -s -L -O"
|
||||
elif (( $+commands[wget] )); then
|
||||
cmd="wget"
|
||||
cmd="command wget"
|
||||
fi
|
||||
|
||||
(
|
||||
|
@ -5,9 +5,9 @@
|
||||
git_prompt_info()
|
||||
{
|
||||
local ref hide_status
|
||||
hide_status="$(git config --get oh-my-zsh.hide-status)"
|
||||
if [[ -n $hide_status ]] && [[ $hide_status != 1 ]]; then
|
||||
ref="$(git symbolic-ref HEAD)" || ref="$(git rev-parse --short HEAD)" || return 0
|
||||
hide_status="$(git config --get oh-my-zsh.hide-status 2>/dev/null)"
|
||||
if [[ $hide_status != 1 ]]; then
|
||||
ref="$(git symbolic-ref HEAD 2>/dev/null)" || ref="$(git rev-parse --short HEAD 2>/dev/null)" || return 0
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user