diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-11-28 03:33:33 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-11-28 03:33:33 +0300 |
commit | 46575182c78d441eacf928fd368a4c20b1aaa0b5 (patch) | |
tree | e0ac6e09fa90de287878b7b1412fc1a5c00d25d8 /powerlevel9k.zsh-theme | |
parent | 972e24ad4132694d3c366678eb942799d1cd09a1 (diff) |
Fallback mechanism is now more robust. If does not matter if the user specified a file or a directory in `POWERLEVEL9K_INSTALLATION_PATH`.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index dfada2e1..610b2cbe 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -32,6 +32,10 @@ if [[ $(whence -w prompt_powerlevel9k_setup) =~ "function" ]]; then print -P "%F{red}We could not locate the installation path of powerlevel9k.%f" print -P "Please specify by setting %F{blue}POWERLEVEL9K_INSTALLATION_PATH%f (full path incl. file name) at the very beginning of your ~/.zshrc" return 1 + elif [[ -f "$POWERLEVEL9K_INSTALLATION_PATH" ]]; then + 0="$POWERLEVEL9K_INSTALLATION_PATH" + elif [[ -d "$POWERLEVEL9K_INSTALLATION_PATH" ]]; then + 0="${POWERLEVEL9K_INSTALLATION_PATH}/powerlevel9k.zsh-theme" fi 0=$POWERLEVEL9K_INSTALLATION_PATH |