aboutsummaryrefslogtreecommitdiff
path: root/internal/wizard.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-10-19 15:39:01 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-10-19 15:39:01 +0300
commit967e845819cc2bbb14eb19620fcad1bf00c533af (patch)
tree810a2d5ccb226657c0c36aab8ca2a06c12e6d237 /internal/wizard.zsh
parentb770e6a3e58f5c2238363fe63839fc808c160456 (diff)
wizard: suppress the outro message if z4h would print its welcome
Diffstat (limited to 'internal/wizard.zsh')
-rw-r--r--internal/wizard.zsh28
1 files changed, 18 insertions, 10 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index c5bee3d7..ac0e2654 100644
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -2074,22 +2074,30 @@ while true; do
done
restore_screen
-print
-flowing +c New config: "%B${__p9k_cfg_path_u//\\/\\\\}%b."
-if [[ -n $config_backup ]]; then
- flowing +c Backup of the old config: "%B${config_backup_u//\\/\\\\}%b."
-fi
-if [[ -n $zshrc_backup ]]; then
- flowing +c Backup of "%B${__p9k_zshrc_u//\\/\\\\}%b:" "%B${zshrc_backup_u//\\/\\\\}%b."
+local -i print_outro=0
+[[ $force == 1 || -z $Z4H || ! -e $Z4H/welcome || $functions[z4h] == 0 ]] && print_outro=1
+
+if (( print_outro )); then
+ print
+
+ flowing +c New config: "%B${__p9k_cfg_path_u//\\/\\\\}%b."
+ if [[ -n $config_backup ]]; then
+ flowing +c Backup of the old config: "%B${config_backup_u//\\/\\\\}%b."
+ fi
+ if [[ -n $zshrc_backup ]]; then
+ flowing +c Backup of "%B${__p9k_zshrc_u//\\/\\\\}%b:" "%B${zshrc_backup_u//\\/\\\\}%b."
+ fi
fi
generate_config || return
change_zshrc || return
-print -rP ""
-flowing +c File feature requests and bug reports at "$(href https://github.com/romkatv/powerlevel10k/issues)"
-print -rP ""
+if (( print_outro )); then
+ print -rP ""
+ flowing +c File feature requests and bug reports at "$(href https://github.com/romkatv/powerlevel10k/issues)"
+ print -rP ""
+fi
success=1