summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-03-19 17:40:30 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-03-19 17:40:30 +0300
commit604de18654ded90a3e200e3f826a5c72b7941cef (patch)
tree427ec69f7e6fba91e939f82b65f8413c245521d9
parentf0770b414e64e72466af3beb7d469e09b6cf61ad (diff)
bail if someone tries to interpet powerlevel9k.zsh-theme with sh
-rwxr-xr-xpowerlevel9k.zsh-theme10
1 files changed, 7 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index e26c3039..af82eedb 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -20,9 +20,13 @@
#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
+test -n "$ZSH_VERSION" || exit 1
+
+if [[ -v _P9K_SOURCED ]]; then
+ prompt_powerlevel9k_setup "$@"
+ return
+fi
+
readonly _P9K_SOURCED=1
typeset -g _P9K_INSTALLATION_DIR