start massive refactoring of config params

pull/145/head
romkatv 5 years ago
parent 5ef0ec415e
commit d63fd9a873

@ -1,14 +1,6 @@
# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8 # 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.
# Color functions typeset -grA __p9k_colors=(
# This file holds some color-functions for
# the powerlevel9k-ZSH-theme
# https://github.com/bhilburn/powerlevel9k
################################################################
# https://jonasjacek.github.io/colors/
# use color names by default to allow dark/light themes to adjust colors based on names
typeset -gAh __P9K_COLORS=(
black 000 black 000
red 001 red 001
green 002 green 002
@ -269,23 +261,25 @@ typeset -gAh __P9K_COLORS=(
grey93 255 grey93 255
) )
# For user convenience: type `getColorCode background` or `getColorCode foreground` to see # For compatibility with Powerlevel9k.
# the list of predefined colors. #
# Type `getColorCode background` or `getColorCode foreground` to see the list of predefined colors.
function getColorCode() { function getColorCode() {
emulate -L zsh
if (( ARGC == 1 )); then if (( ARGC == 1 )); then
case $1 in case $1 in
foreground) foreground)
local k local k
for k in "${(k@)__P9K_COLORS}"; do for k in "${(k@)__p9k_colors}"; do
local v=${__P9K_COLORS[$k]} local v=${__p9k_colors[$k]}
print -P "%F{$v}$v - $k%f" print -P "%F{$v}$v - $k%f"
done done
return return
;; ;;
background) background)
local k local k
for k in "${(k@)__P9K_COLORS}"; do for k in "${(k@)__p9k_colors}"; do
local v=${__P9K_COLORS[$k]} local v=${__p9k_colors[$k]}
print -P "%K{$v}$v - $k%k" print -P "%K{$v}$v - $k%k"
done done
return return

@ -1,34 +1,15 @@
# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8 typeset -gA icons
################################################################
# icons
# This file holds the icon definitions and
# icon-functions for the powerlevel9k-ZSH-theme
# https://github.com/bhilburn/powerlevel9k
################################################################
# These characters require the Powerline fonts to work properly. If you see
# boxes or bizarre characters below, your fonts are not correctly installed. If
# you do not want to install a special font, you can set `POWERLEVEL9K_MODE` to
# `compatible`. This shows all icons in regular symbols.
# Initialize the icon list according to the user's `POWERLEVEL9K_MODE`.
typeset -gAH icons
set_default POWERLEVEL9K_HIDE_BRANCH_ICON false
set_default POWERLEVEL9K_MODE ""
typeset -gi _P9K_ICONS_INITIALIZED=0
function _p9k_init_icons() { function _p9k_init_icons() {
(( _P9K_ICONS_INITIALIZED )) && return [[ $+_p9k_icon_mode && $_p9k_icon_mode == $POWERLEVEL9K_MODE ]] && return
_P9K_ICONS_INITIALIZED=1 typeset -g _p9k_icon_mode=$POWERLEVEL9K_MODE
local LC_ALL=C.UTF-8
case $POWERLEVEL9K_MODE in case $POWERLEVEL9K_MODE in
'flat'|'awesome-patched') 'flat'|'awesome-patched')
# Awesome-Patched Font required! See: # Awesome-Patched Font required! See:
# https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched # https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
icons=( icons=(
RULER_CHAR $'\u2500' # ─ RULER_CHAR $'\u2500' # ─
LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  LEFT_SEGMENT_SEPARATOR $'\uE0B0' # 
@ -131,8 +112,6 @@ function _p9k_init_icons() {
'awesome-fontconfig') 'awesome-fontconfig')
# fontconfig with awesome-font required! See # fontconfig with awesome-font required! See
# https://github.com/gabrielelana/awesome-terminal-fonts # https://github.com/gabrielelana/awesome-terminal-fonts
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
icons=( icons=(
RULER_CHAR $'\u2500' # ─ RULER_CHAR $'\u2500' # ─
LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  LEFT_SEGMENT_SEPARATOR $'\uE0B0' # 
@ -232,16 +211,12 @@ function _p9k_init_icons() {
# mapped fontconfig with awesome-font required! See # mapped fontconfig with awesome-font required! See
# https://github.com/gabrielelana/awesome-terminal-fonts # https://github.com/gabrielelana/awesome-terminal-fonts
# don't forget to source the font maps in your startup script # don't forget to source the font maps in your startup script
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
if [ -z "$AWESOME_GLYPHS_LOADED" ]; then if [ -z "$AWESOME_GLYPHS_LOADED" ]; then
echo "Powerlevel9k warning: Awesome-Font mappings have not been loaded. echo "Powerlevel9k warning: Awesome-Font mappings have not been loaded.
Source a font mapping in your shell config, per the Awesome-Font docs Source a font mapping in your shell config, per the Awesome-Font docs
(https://github.com/gabrielelana/awesome-terminal-fonts), (https://github.com/gabrielelana/awesome-terminal-fonts),
Or use a different Powerlevel9k font configuration."; Or use a different Powerlevel9k font configuration.";
fi fi
icons=( icons=(
RULER_CHAR $'\u2500' # ─ RULER_CHAR $'\u2500' # ─
LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  LEFT_SEGMENT_SEPARATOR $'\uE0B0' # 
@ -337,8 +312,6 @@ function _p9k_init_icons() {
# nerd-font patched (complete) font required! See # nerd-font patched (complete) font required! See
# https://github.com/ryanoasis/nerd-fonts # https://github.com/ryanoasis/nerd-fonts
# http://nerdfonts.com/#cheat-sheet # http://nerdfonts.com/#cheat-sheet
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
icons=( icons=(
RULER_CHAR $'\u2500' # ─ RULER_CHAR $'\u2500' # ─
LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  LEFT_SEGMENT_SEPARATOR $'\uE0B0' # 
@ -437,8 +410,6 @@ function _p9k_init_icons() {
*) *)
# Powerline-Patched Font required! # Powerline-Patched Font required!
# See https://github.com/Lokaltog/powerline-fonts # See https://github.com/Lokaltog/powerline-fonts
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
icons=( icons=(
RULER_CHAR $'\u2500' # ─ RULER_CHAR $'\u2500' # ─
LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  LEFT_SEGMENT_SEPARATOR $'\uE0B0' # 
@ -539,30 +510,22 @@ function _p9k_init_icons() {
# Override the above icon settings with any user-defined variables. # Override the above icon settings with any user-defined variables.
case $POWERLEVEL9K_MODE in case $POWERLEVEL9K_MODE in
'flat') 'flat')
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
icons[LEFT_SEGMENT_SEPARATOR]='' icons[LEFT_SEGMENT_SEPARATOR]=''
icons[RIGHT_SEGMENT_SEPARATOR]='' icons[RIGHT_SEGMENT_SEPARATOR]=''
icons[LEFT_SUBSEGMENT_SEPARATOR]='|' icons[LEFT_SUBSEGMENT_SEPARATOR]='|'
icons[RIGHT_SUBSEGMENT_SEPARATOR]='|' icons[RIGHT_SUBSEGMENT_SEPARATOR]='|'
;; ;;
'compatible') 'compatible')
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
icons[LEFT_SEGMENT_SEPARATOR]=$'\u2B80' # ⮀ icons[LEFT_SEGMENT_SEPARATOR]=$'\u2B80' # ⮀
icons[RIGHT_SEGMENT_SEPARATOR]=$'\u2B82' # ⮂ icons[RIGHT_SEGMENT_SEPARATOR]=$'\u2B82' # ⮂
icons[VCS_BRANCH_ICON]='@' icons[VCS_BRANCH_ICON]='@'
;; ;;
esac esac
if [[ "$POWERLEVEL9K_HIDE_BRANCH_ICON" == true ]]; then
icons[VCS_BRANCH_ICON]=''
fi
} }
# Safety function for printing icons # Sadly, this is a part of public API. Its use is emphatically discouraged.
# Prints the named icon, or if that icon is undefined, the string name.
function print_icon() { function print_icon() {
emulate -L zsh
_p9k_init_icons _p9k_init_icons
local icon_name=$1 local icon_name=$1
local var_name=POWERLEVEL9K_${icon_name} local var_name=POWERLEVEL9K_${icon_name}
@ -573,11 +536,13 @@ function print_icon() {
fi fi
} }
# Get a list of configured icons # Prints a list of configured icons.
#
# * $1 string - If "original", then the original icons are printed, # * $1 string - If "original", then the original icons are printed,
# otherwise "print_icon" is used, which takes the users # otherwise "print_icon" is used, which takes the users
# overrides into account. # overrides into account.
function get_icon_names() { function get_icon_names() {
emulate -L zsh
_p9k_init_icons _p9k_init_icons
# Iterate over a ordered list of keys of the icons array # Iterate over a ordered list of keys of the icons array
for key in ${(@kon)icons}; do for key in ${(@kon)icons}; do

@ -1,48 +1,46 @@
# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8 # _p9k_declare <type> <uppercase-name> [default]...
################################################################ function _p9k_declare() {
# Utility functions local -i set=$+parameters[$2]
# This file holds some utility-functions for (( ARGC > 2 || set )) || return 0
# the powerlevel9k-ZSH-theme case $1 in
# https://github.com/bhilburn/powerlevel9k -b)
################################################################ if (( set )); then
[[ ${(P)2} == true ]] && typeset -gi _$2=1 || typeset -gi _$2=0
# Usage: set_default [OPTION]... NAME [VALUE]... else
# typeset -gi _$2=$3
# Options are the same as in `typeset`. fi
function set_default() { ;;
emulate -L zsh -a)
local -a flags=(-g) local -a v=(${(P)2})
while true; do if (( set )); then
case $1 in eval "typeset -ga _${(q)2}=(${(@qq)v})";
--) shift; break;; else
-*) flags+=$1; shift;; if [[ $3 != '--' ]]; then
*) break; echo "internal error in _p9k_declare " "${(qqq)@}" >&2
esac fi
done eval "typeset -ga _${(q)2}=(${(@qq)*[4,-1]})"
fi
local varname=$1 ;;
shift -i)
if [[ -n ${(tP)varname} ]]; then (( set )) && typeset -gi _$2=$2 || typeset -gi _$2=$3
typeset $flags $varname ;;
elif [[ "$flags" == *[aA]* ]]; then -F)
eval "typeset ${(@q)flags} ${(q)varname}=(${(qq)@})" (( set )) && typeset -gF _$2=$2 || typeset -gF _$2=$3
else ;;
typeset $flags $varname="$*" -s)
fi (( set )) && typeset -g _$2=${(P)2} || typeset -g _$2=$3
} ;;
-e)
function _p9k_g_expand() { if (( set )); then
(( $+parameters[$1] )) || return local v=${(P)2}
local -a ts=("${=$(typeset -p $1)}") typeset -g _$2=${(g::)v}
shift ts else
local x typeset -g _$2=${(g::)3}
for x in "${ts[@]}"; do fi
[[ $x == -* ]] || break ;;
# Don't change readonly variables. Ideally, we shouldn't modify any variables at all, *)
# but for now this will do. echo "internal error in _p9k_declare " "${(qqq)@}" >&2
[[ $x == -*r* ]] && return esac
done
typeset -g $1=${(g::)${(P)1}}
} }
# If we execute `print -P $1`, how many characters will be printed on the last line? # If we execute `print -P $1`, how many characters will be printed on the last line?
@ -69,21 +67,21 @@ function _p9k_prompt_length() {
typeset ${${(%):-$1%$m(l.x.y)}[-1]}=$m typeset ${${(%):-$1%$m(l.x.y)}[-1]}=$m
done done
fi fi
_P9K_RETVAL=$x _p9k_ret=$x
} }
typeset -g _P9K_BYTE_SUFFIX=('B' 'K' 'M' 'G' 'T' 'P' 'E' 'Z' 'Y') typeset -gr __p9k_byte_suffix=('B' 'K' 'M' 'G' 'T' 'P' 'E' 'Z' 'Y')
# 42 => 42B # 42 => 42B
# 1536 => 1.5K # 1536 => 1.5K
function _p9k_human_readable_bytes() { function _p9k_human_readable_bytes() {
typeset -F 2 n=$1 typeset -F 2 n=$1
local suf local suf
for suf in $_P9K_BYTE_SUFFIX; do for suf in $__p9k_byte_suffix; do
(( n < 100 )) && break (( n < 100 )) && break
(( n /= 1024 )) (( n /= 1024 ))
done done
_P9K_RETVAL=$n$suf _p9k_ret=$n$suf
} }
# Determine if the passed segment is used in the prompt # Determine if the passed segment is used in the prompt
@ -92,11 +90,10 @@ function _p9k_human_readable_bytes() {
# either the LEFT or RIGHT prompt arrays. # either the LEFT or RIGHT prompt arrays.
# * $1: The segment to be tested. # * $1: The segment to be tested.
segment_in_use() { segment_in_use() {
local key=$1 [[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${1}]}" ||
[[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${key}]}" || -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${1}_joined]}" ||
-n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${key}_joined]}" || -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${1}]}" ||
-n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${key}]}" || -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${1}_joined]}" ]]
-n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${key}_joined]}" ]]
} }
function _p9k_parse_ip() { function _p9k_parse_ip() {
@ -120,7 +117,7 @@ function _p9k_parse_ip() {
local ipFound="${match[3]}" local ipFound="${match[3]}"
local -a interfaceStates=(${(s:,:)match[1]}) local -a interfaceStates=(${(s:,:)match[1]})
if (( ${interfaceStates[(I)UP]} )); then if (( ${interfaceStates[(I)UP]} )); then
_P9K_RETVAL=$ipFound _p9k_ret=$ipFound
return return
fi fi
fi fi
@ -132,7 +129,7 @@ function _p9k_parse_ip() {
local interface local interface
for interface in "${(@)interfaces}"; do for interface in "${(@)interfaces}"; do
if [[ "$interface" =~ $pattern ]]; then if [[ "$interface" =~ $pattern ]]; then
_P9K_RETVAL=$match[1] _p9k_ret=$match[1]
return return
fi fi
done done

@ -1,12 +1,3 @@
# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8
################################################################
# vcs
# This file holds supplemental VCS functions
# for the powerlevel9k-ZSH-theme
# https://github.com/bhilburn/powerlevel9k
################################################################
set_default POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY false
function +vi-git-untracked() { function +vi-git-untracked() {
[[ -z "${vcs_comm[gitdir]}" || "${vcs_comm[gitdir]}" == "." ]] && return [[ -z "${vcs_comm[gitdir]}" || "${vcs_comm[gitdir]}" == "." ]] && return
@ -17,7 +8,7 @@ function +vi-git-untracked() {
local untrackedFiles=$(command git ls-files --others --exclude-standard "${repoTopLevel}" 2> /dev/null) local untrackedFiles=$(command git ls-files --others --exclude-standard "${repoTopLevel}" 2> /dev/null)
if [[ -z $untrackedFiles && "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" ]]; then if [[ -z $untrackedFiles && $_POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY == 1 ]]; then
untrackedFiles+=$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard' 2> /dev/null) untrackedFiles+=$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard' 2> /dev/null)
fi fi
@ -51,20 +42,24 @@ function +vi-git-remotebranch() {
# Are we on a remote-tracking branch? # Are we on a remote-tracking branch?
remote=${$(command git rev-parse --verify HEAD@{upstream} --symbolic-full-name 2>/dev/null)/refs\/(remotes|heads)\/} remote=${$(command git rev-parse --verify HEAD@{upstream} --symbolic-full-name 2>/dev/null)/refs\/(remotes|heads)\/}
if [[ -n "$POWERLEVEL9K_VCS_SHORTEN_LENGTH" ]] && [[ -n "$POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH" ]]; then if (( $+_POWERLEVEL9K_VCS_SHORTEN_LENGTH && $+_POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH )); then
if [ ${#hook_com[branch]} -gt ${POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH} ] && [ ${#hook_com[branch]} -gt ${POWERLEVEL9K_VCS_SHORTEN_LENGTH} ]; then if (( ${#hook_com[branch]} > _POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH && ${#hook_com[branch]} > _POWERLEVEL9K_VCS_SHORTEN_LENGTH )); then
case "$POWERLEVEL9K_VCS_SHORTEN_STRATEGY" in case $_POWERLEVEL9K_VCS_SHORTEN_STRATEGY in
truncate_middle) truncate_middle)
hook_com[branch]="${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}${POWERLEVEL9K_VCS_SHORTEN_DELIMITER}${branch_name: -$POWERLEVEL9K_VCS_SHORTEN_LENGTH}" hook_com[branch]="${branch_name:0:$_POWERLEVEL9K_VCS_SHORTEN_LENGTH}${_POWERLEVEL9K_VCS_SHORTEN_DELIMITER}${branch_name: -$_POWERLEVEL9K_VCS_SHORTEN_LENGTH}"
;; ;;
truncate_from_right) truncate_from_right)
hook_com[branch]="${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}${POWERLEVEL9K_VCS_SHORTEN_DELIMITER}" hook_com[branch]="${branch_name:0:$_POWERLEVEL9K_VCS_SHORTEN_LENGTH}${_POWERLEVEL9K_VCS_SHORTEN_DELIMITER}"
;; ;;
esac esac
fi fi
fi fi
hook_com[branch]="$(print_icon 'VCS_BRANCH_ICON')${hook_com[branch]}" if (( _POWERLEVEL9K_HIDE_BRANCH_ICON )); then
hook_com[branch]="${hook_com[branch]}"
else
hook_com[branch]="$(print_icon 'VCS_BRANCH_ICON')${hook_com[branch]}"
fi
# Always show the remote # Always show the remote
#if [[ -n ${remote} ]] ; then #if [[ -n ${remote} ]] ; then
# Only show the remote if it differs from the local # Only show the remote if it differs from the local
@ -73,30 +68,33 @@ function +vi-git-remotebranch() {
fi fi
} }
set_default POWERLEVEL9K_VCS_HIDE_TAGS false
function +vi-git-tagname() { function +vi-git-tagname() {
if [[ "$POWERLEVEL9K_VCS_HIDE_TAGS" == "false" ]]; then if (( !_POWERLEVEL9K_VCS_HIDE_TAGS )); then
# If we are on a tag, append the tagname to the current branch string. # If we are on a tag, append the tagname to the current branch string.
local tag local tag
tag=$(command git describe --tags --exact-match HEAD 2>/dev/null) tag=$(command git describe --tags --exact-match HEAD 2>/dev/null)
if [[ -n "${tag}" ]] ; then if [[ -n "${tag}" ]] ; then
# There is a tag that points to our current commit. Need to determine if we # There is a tag that points to our current commit. Need to determine if we
# are also on a branch, or are in a DETACHED_HEAD state. # are also on a branch, or are in a DETACHED_HEAD state.
if [[ -z $(command git symbolic-ref HEAD 2>/dev/null) ]]; then if [[ -z $(command git symbolic-ref HEAD 2>/dev/null) ]]; then
# DETACHED_HEAD state. We want to append the tag name to the commit hash # DETACHED_HEAD state. We want to append the tag name to the commit hash
# and print it. Unfortunately, `vcs_info` blows away the hash when a tag # and print it. Unfortunately, `vcs_info` blows away the hash when a tag
# exists, so we have to manually retrieve it and clobber the branch # exists, so we have to manually retrieve it and clobber the branch
# string. # string.
local revision local revision
revision=$(command git rev-list -n 1 --abbrev-commit --abbrev=${POWERLEVEL9K_VCS_INTERNAL_HASH_LENGTH} HEAD) revision=$(command git rev-list -n 1 --abbrev-commit --abbrev=${_POWERLEVEL9K_CHANGESET_HASH_LENGTH} HEAD)
if (( _POWERLEVEL9K_HIDE_BRANCH_ICON )); then
hook_com[branch]="${revision} $(print_icon 'VCS_TAG_ICON')${tag}"
else
hook_com[branch]="$(print_icon 'VCS_BRANCH_ICON')${revision} $(print_icon 'VCS_TAG_ICON')${tag}" hook_com[branch]="$(print_icon 'VCS_BRANCH_ICON')${revision} $(print_icon 'VCS_TAG_ICON')${tag}"
else fi
# We are on both a tag and a branch; print both by appending the tag name. else
hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}" # We are on both a tag and a branch; print both by appending the tag name.
fi hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}"
fi fi
fi fi
fi
} }
# Show count of stashed changes # Show count of stashed changes

File diff suppressed because it is too large Load Diff

@ -20,32 +20,33 @@ fi
() { () {
emulate -L zsh emulate -L zsh
if (( $+_p9k_sourced )); then if (( $+__p9k_sourced )); then
prompt_powerlevel9k_setup prompt_powerlevel9k_setup
return return
fi fi
typeset -gr _p9k_sourced=1 typeset -gr __p9k_sourced=1
typeset -g _p9k_installation_dir='' typeset -g __p9k_installation_dir=''
if [[ -n $POWERLEVEL9K_INSTALLATION_DIR ]]; then if [[ -n $POWERLEVEL9K_INSTALLATION_DIR ]]; then
_p9k_installation_dir=${POWERLEVEL9K_INSTALLATION_DIR:A} __p9k_installation_dir=${POWERLEVEL9K_INSTALLATION_DIR:A}
else else
if [[ ${(%):-%N} == '(eval)' ]]; then if [[ ${(%):-%N} == '(eval)' ]]; then
if [[ $0 == '-antigen-load' && -r powerlevel9k.zsh-theme ]]; then if [[ $0 == '-antigen-load' && -r powerlevel9k.zsh-theme ]]; then
# Antigen uses eval to load things so it can change the plugin (!!) # Antigen uses eval to load things so it can change the plugin (!!)
# https://github.com/zsh-users/antigen/issues/581 # https://github.com/zsh-users/antigen/issues/581
_p9k_installation_dir=$PWD __p9k_installation_dir=$PWD
else else
>&2 print -P '%F{red}[ERROR]%f Powerlevel10k cannot figure out its installation directory.' >&2 print -P '%F{red}[ERROR]%f Powerlevel10k cannot figure out its installation directory.'
>&2 print -P 'Please set %F{green}POWERLEVEL9K_INSTALLATION_DIR.%f' >&2 print -P 'Please set %F{green}POWERLEVEL9K_INSTALLATION_DIR.%f'
return 1 return
fi fi
else else
_p9k_installation_dir=${${(%):-%x}:A:h} __p9k_installation_dir=${${(%):-%x}:A:h}
fi fi
fi fi
source $_p9k_installation_dir/internal/p10k.zsh typeset -gr __p9k_installation_dir
source $__p9k_installation_dir/internal/p10k.zsh || true
} }
(( ! _p9k_restore_aliases )) || setopt aliases (( ! _p9k_restore_aliases )) || setopt aliases

Loading…
Cancel
Save