aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorAlexara Wu <alexarawu@outlook.com>2018-07-14 15:41:15 +0300
committerAlexara Wu <alexarawu@outlook.com>2018-07-14 15:41:15 +0300
commit45fe401dc249c14ba6459faa5358d248baa63df8 (patch)
tree8e9a0c6fe2c7f0ca0572c146383e7654344d9271 /powerlevel9k.zsh-theme
parent9f09547ad1fb739f7535af029345797e78caf648 (diff)
Improve conditions in `rbenv` & `pyenv`
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 84d843f3..5f32ae78 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1270,7 +1270,7 @@ prompt_rbenv() {
elif [ $commands[rbenv] ]; then
local rbenv_version_name="$(rbenv version-name)"
local rbenv_global="$(rbenv global)"
- if ! [[ $rbenv_version_name == $rbenv_global && "$POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW" = false ]]; then
+ if [[ "${rbenv_version_name}" != "${rbenv_global}" || "${POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW}" == "true" ]]; then
"$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$rbenv_version_name" 'RUBY_ICON'
fi
fi
@@ -1635,7 +1635,7 @@ prompt_pyenv() {
elif [ $commands[pyenv] ]; then
local pyenv_version_name="$(pyenv version-name)"
local pyenv_global="$(pyenv version-file-read $(pyenv root)/version)"
- if ! [[ $pyenv_version_name == $pyenv_global && "$POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW" = false ]]; then
+ if [[ "${pyenv_version_name}" != "${pyenv_global}" || "${POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW}" == "true" ]]; then
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "$pyenv_version_name" 'PYTHON_ICON'
fi
fi