1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 01:50:06 +00:00

don't print options when no_aliases, no_sh_glob and brace_expand are all set

This commit is contained in:
romkatv 2019-10-03 14:50:08 +02:00
parent 0cb680edd1
commit aa606e6cb0
4 changed files with 11 additions and 11 deletions

View file

@ -761,5 +761,5 @@
typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
}
setopt ${p10k_config_opts[@]}
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
'builtin' 'unset' 'p10k_config_opts'

View file

@ -740,5 +740,5 @@
typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'
}
setopt ${p10k_config_opts[@]}
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
'builtin' 'unset' 'p10k_config_opts'

View file

@ -100,5 +100,5 @@
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=yellow
}
setopt ${p10k_config_opts[@]}
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
'builtin' 'unset' 'p10k_config_opts'

View file

@ -10,12 +10,12 @@
# https://github.com/robbyrussell/oh-my-zsh/blob/74177c5320b2a1b2f8c4c695c05984b57fd7c6ea/themes/agnoster.zsh-theme
################################################################
if [[ -o 'aliases' ]]; then
'builtin' 'unsetopt' 'aliases'
local __p9k_restore_aliases=1
else
local __p9k_restore_aliases=0
fi
# Temporarily change options.
'builtin' 'local' '-a' '_p9k_src_opts'
[[ ! -o 'aliases' ]] || _p9k_src_opts+=('aliases')
[[ ! -o 'sh_glob' ]] || _p9k_src_opts+=('sh_glob')
[[ ! -o 'no_brace_expand' ]] || _p9k_src_opts+=('no_brace_expand')
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
typeset -g __p9k_root_dir="${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}"
@ -34,5 +34,5 @@ typeset -g __p9k_root_dir="${POWERLEVEL9K_INSTALLATION_DIR:-${${(%):-%x}:A:h}}"
source $__p9k_root_dir/internal/p10k.zsh || true
}
(( ! __p9k_restore_aliases )) || setopt aliases
'builtin' 'unset' '__p9k_restore_aliases'
(( ${#_p9k_src_opts} )) && setopt ${_p9k_src_opts[@]}
'builtin' 'unset' '_p9k_src_opts'