aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorJohn Koelndorfer <jkoelndorfer@gmail.com>2015-09-02 02:33:59 +0300
committerJohn Koelndorfer <jkoelndorfer@gmail.com>2015-09-02 02:50:18 +0300
commit893bfe243d853ccb63efb4144f9d91a5c20a0160 (patch)
treecf1fcfdfce17eeb2a3e4823324c8d494cc0771bb /powerlevel9k.zsh-theme
parentb19de85c1622f4c3663f265226b7fb383160099d (diff)
Use defined to set right, left prompt elements.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r--powerlevel9k.zsh-theme8
1 files changed, 2 insertions, 6 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 0260285f..d5f77148 100644
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -669,9 +669,7 @@ prompt_virtualenv() {
# Main prompt
build_left_prompt() {
- if [[ "${#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS}" == 0 ]]; then
- POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir rbenv vcs)
- fi
+ defined POWERLEVEL9K_LEFT_PROMPT_ELEMENTS || POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir rbenv vcs)
for element in $POWERLEVEL9K_LEFT_PROMPT_ELEMENTS; do
prompt_$element "left"
@@ -684,9 +682,7 @@ build_left_prompt() {
build_right_prompt() {
RETVAL=$?
- if [[ "${#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS}" == 0 ]]; then
- POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(longstatus history time)
- fi
+ defined POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS || POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(longstatus history time)
for element in $POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS; do
prompt_$element "right"