aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-08-01 21:03:34 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-08-01 21:03:34 +0300
commita29b8264e51b402135943ab5a9d8790c8f6cd939 (patch)
tree092f6de3c0ef5f7c53747a7bf928e20242682b1d /internal
parent5a94a0c9ebd69349abfafae8fdab7f2c4e368210 (diff)
source .p10k.zsh only if it exists
Diffstat (limited to 'internal')
-rwxr-xr-xinternal/wizard.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 8f34fa1d..6d18f2ed 100755
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -949,12 +949,12 @@ function write_zshrc() {
local comments=(
"# To customize prompt, run \`p10k configure\` or edit $__p9k_cfg_path_u."
)
- print -lr -- "" $comments "source $__p9k_cfg_path_u" >>$__p9k_zshrc
+ print -lr -- "" $comments "[[ -f $__p9k_cfg_path_u ]] && source $__p9k_cfg_path_u" >>$__p9k_zshrc
print -P ""
print -P "The following lines have been appended to %4F$__p9k_zshrc_u%f:"
print -P ""
- print -lP -- ' '${^comments} " %2Fsource%f %B$__p9k_cfg_path_u%b"
+ print -lP -- ' '${^comments} " %3F[[%f %B-f $__p9k_cfg_path_u%b %3F]]%f && %2Fsource%f %B$__p9k_cfg_path_u%b"
}
if (( force )); then