fix `p10k display -a`

pull/501/head
romkatv 5 years ago
parent f06be72977
commit d71d1409c4

@ -1,4 +1,4 @@
if [[ $__p9k_sourced != 5 ]]; then if [[ $__p9k_sourced != 6 ]]; then
>&2 print -P "" >&2 print -P ""
>&2 print -P "[%F{1}ERROR%f]: Corrupted powerlevel10k installation." >&2 print -P "[%F{1}ERROR%f]: Corrupted powerlevel10k installation."
>&2 print -P "" >&2 print -P ""
@ -7562,7 +7562,7 @@ typeset -gi __p9k_reset_state
function p10k() { function p10k() {
[[ $# != 1 || $1 != finalize ]] || { p10k-instant-prompt-finalize; return 0 } [[ $# != 1 || $1 != finalize ]] || { p10k-instant-prompt-finalize; return 0 }
eval "$__p9k_intro" eval "$__p9k_intro_no_reply"
if (( !ARGC )); then if (( !ARGC )); then
print -rP -- $__p9k_p10k_usage >&2 print -rP -- $__p9k_p10k_usage >&2
@ -7571,6 +7571,8 @@ function p10k() {
case $1 in case $1 in
segment) segment)
local REPLY
local -a reply
shift shift
local -i OPTIND local -i OPTIND
local OPTARG opt state bg=0 fg icon cond text ref=0 expand=0 local OPTARG opt state bg=0 fg icon cond text ref=0 expand=0
@ -7635,6 +7637,8 @@ function p10k() {
done done
return 0 return 0
fi fi
local REPLY
local -a reply
for opt in "${@:$OPTIND}"; do for opt in "${@:$OPTIND}"; do
pair=(${(s:=:)opt}) pair=(${(s:=:)opt})
list=(${(s:,:)${pair[2]}}) list=(${(s:,:)${pair[2]}})
@ -7677,6 +7681,8 @@ function p10k() {
print -rP -- $__p9k_p10k_configure_usage >&2 print -rP -- $__p9k_p10k_configure_usage >&2
return 1 return 1
fi fi
local REPLY
local -a reply
p9k_configure "$@" || return p9k_configure "$@" || return
;; ;;
reload) reload)

@ -18,12 +18,20 @@
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
(( $+__p9k_root_dir )) || typeset -gr __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}} (( $+__p9k_root_dir )) || typeset -gr __p9k_root_dir=${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}
(( $+__p9k_intro )) || {
# Note: leading spaces before `local` are important. Otherwise Antigen will remove `local` (!!!). # Note: leading spaces before `local` are important. Otherwise Antigen will remove `local` (!!!).
(( $+__p9k_intro )) || typeset -gr __p9k_intro='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent typeset -gr __p9k_intro='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent
local -a match mbegin mend reply local -a match mbegin mend reply
local -i MBEGIN MEND OPTIND local -i MBEGIN MEND OPTIND
local MATCH REPLY OPTARG IFS=$'\'' \t\n\0'\'' local MATCH REPLY OPTARG IFS=$'\'' \t\n\0'\''
[[ -z $_p9k__locale ]] || local LC_ALL=$_p9k__locale' [[ -z $_p9k__locale ]] || local LC_ALL=$_p9k__locale'
# The same as above but without `local -a reply` and `local REPLY`.
typeset -gr __p9k_intro_no_reply='emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent
local -a match mbegin mend
local -i MBEGIN MEND OPTIND
local REPLY OPTARG IFS=$'\'' \t\n\0'\''
[[ -z $_p9k__locale ]] || local LC_ALL=$_p9k__locale'
}
() { () {
eval "$__p9k_intro" eval "$__p9k_intro"
@ -35,7 +43,7 @@
if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file ]] && (( ! $+functions[_p9k_preinit] )) && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file ]] && (( ! $+functions[_p9k_preinit] )) && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
_p9k_preinit _p9k_preinit
fi fi
typeset -gr __p9k_sourced=5 typeset -gr __p9k_sourced=6
if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus && ${(%):-%#} == % ]]; then if [[ -w $__p9k_root_dir && -w $__p9k_root_dir/internal && -w $__p9k_root_dir/gitstatus && ${(%):-%#} == % ]]; then
local f local f
for f in $__p9k_root_dir/{powerlevel9k.zsh-theme,powerlevel10k.zsh-theme,internal/p10k.zsh,internal/icons.zsh,internal/configure.zsh,internal/worker.zsh,internal/parser.zsh,gitstatus/gitstatus.plugin.zsh}; do for f in $__p9k_root_dir/{powerlevel9k.zsh-theme,powerlevel10k.zsh-theme,internal/p10k.zsh,internal/icons.zsh,internal/configure.zsh,internal/worker.zsh,internal/parser.zsh,gitstatus/gitstatus.plugin.zsh}; do

Loading…
Cancel
Save