aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-03-14 00:00:15 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-03-14 00:00:15 +0300
commit0fa2f7ba65add69cb29149a6da8930c5179de1f7 (patch)
tree6ea14f8a634acfb3ca599f8c1d64dea9a8787188
parent45588cc28a132602e334c6ebb8bb876bd85903c4 (diff)
bail out when the theme is being sourced second time
-rwxr-xr-xpowerlevel9k.zsh-theme5
1 files changed, 5 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 523d42c8..1f8f4342 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -20,6 +20,11 @@
#zstyle ':vcs_info:*+*:*' debug true
#set -o xtrace
+# Bail out if it's not the first time the file is being sourced.
+# Second sourcing will cause mayhem.
+[[ -v _P9K_SOURCED ]] && return
+readonly _P9K_SOURCED=1
+
typeset -g _P9K_INSTALLATION_DIR
# Try to set the installation path