96e473a1d65cf3a093be2c742eea427706f18c01

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

fix(random): fix `ZSH_THEME_RANDOM_QUIET` check (#10534)

BREAKING CHANGE: For consistency, `ZSH_THEME_RANDOM_QUIET` now needs to
be `true` if you want to silence the "Random theme loaded" message in the
`random` theme.

The wiki specified that 1 or true was valid, while the code just
checked whether it was set to any value. Being more strict makes
sure that we're consistent with the rest of the Settings.

Fixes #10534

Diff

 1diff --git a/themes/random.zsh-theme b/themes/random.zsh-theme
 2index f0b8e5c18d1b60de82c890a8a94ce3fecdec927a..173d5b33f94e732abf3a0a76f140e99a71923557 100644
 3--- a/themes/random.zsh-theme
 4+++ b/themes/random.zsh-theme
 5@@ -42,6 +42,6 @@ else
 6   return 1
 7 fi
 8 
 9-if [[ -z "$ZSH_THEME_RANDOM_QUIET" ]]; then
10+if [[ "$ZSH_THEME_RANDOM_QUIET" = true ]]; then
11   echo "[oh-my-zsh] Random theme '${RANDOM_THEME}' loaded"
12 fi