wizard: suppress the into message if z4h would print its welcome

This commit is contained in:
Roman Perepelitsa 2020-10-19 14:46:22 +02:00
parent 967e845819
commit fb2805e5ab

View file

@ -23,6 +23,9 @@ else
function restore_screen() {} function restore_screen() {}
fi fi
local -i in_z4h_wizard=0
[[ $force == 0 && $functions[z4h] == 1 && -n $Z4H && -e $Z4H/welcome ]] && in_z4h_wizard=1
local -i success=0 local -i success=0
{ # always { # always
@ -418,6 +421,7 @@ function ask() {
local -i greeting_printed=0 local -i greeting_printed=0
function print_greeting() { function print_greeting() {
(( in_z4h_wizard )) && return
(( greeting_printed )) && return (( greeting_printed )) && return
if (( force )); then if (( force )); then
flowing -c This is %4FPowerlevel10k configuration wizard%f. \ flowing -c This is %4FPowerlevel10k configuration wizard%f. \
@ -2075,10 +2079,7 @@ done
restore_screen restore_screen
local -i print_outro=0 if (( !in_z4h_wizard )); then
[[ $force == 1 || -z $Z4H || ! -e $Z4H/welcome || $functions[z4h] == 0 ]] && print_outro=1
if (( print_outro )); then
print print
flowing +c New config: "%B${__p9k_cfg_path_u//\\/\\\\}%b." flowing +c New config: "%B${__p9k_cfg_path_u//\\/\\\\}%b."
@ -2093,7 +2094,7 @@ fi
generate_config || return generate_config || return
change_zshrc || return change_zshrc || return
if (( print_outro )); then if (( !in_z4h_wizard )); then
print -rP "" print -rP ""
flowing +c File feature requests and bug reports at "$(href https://github.com/romkatv/powerlevel10k/issues)" flowing +c File feature requests and bug reports at "$(href https://github.com/romkatv/powerlevel10k/issues)"
print -rP "" print -rP ""