7b708519b9395914fb47b6c31132fb67fb8b721b

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

Message

fix(emotty): show error on missing plugin dependencies (#9811)

Diff

 1diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme
 2index 044b317e83a5ee86d4b334b56435318754cf8c88..ba08409506ff36059a26f21fadff87d34d3b2832 100644
 3--- a/themes/emotty.zsh-theme
 4+++ b/themes/emotty.zsh-theme
 5@@ -46,6 +46,16 @@
 6 # is shown (see vcs_action_glyph variable, default: chevron).
 7 # ------------------------------------------------------------------------------
 8 
 9+(( ${+functions[emotty]} )) || {
10+  echo "error: the emotty theme requires the emotty plugin" >&2
11+  return 1
12+}
13+
14+(( ${+emoji} )) || {
15+  echo "error: the emotty theme requires the emoji plugin" >&2
16+  return 1
17+}
18+
19 user_prompt="$(emotty)"
20 root_prompt="$emoji[skull]"
21 warn_prompt="$emoji[collision_symbol]"