diff options
author | Marc Cornellà <hello@mcornella.com> | 2022-02-10 18:25:09 +0100 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2022-02-10 18:25:09 +0100 |
commit | 7b708519b9395914fb47b6c31132fb67fb8b721b (patch) | |
tree | 09ca10bc11378842974c18d9fc70d917ccddb918 /themes | |
parent | 6396dfb97f13f5fbb0ef98cd5221600b89ff889a (diff) | |
download | zsh-7b708519b9395914fb47b6c31132fb67fb8b721b.tar.gz zsh-7b708519b9395914fb47b6c31132fb67fb8b721b.tar.bz2 zsh-7b708519b9395914fb47b6c31132fb67fb8b721b.zip |
fix(emotty): show error on missing plugin dependencies (#9811)
Diffstat (limited to 'themes')
-rw-r--r-- | themes/emotty.zsh-theme | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme index 044b317e8..ba0840950 100644 --- a/themes/emotty.zsh-theme +++ b/themes/emotty.zsh-theme @@ -46,6 +46,16 @@ # is shown (see vcs_action_glyph variable, default: chevron). # ------------------------------------------------------------------------------ +(( ${+functions[emotty]} )) || { + echo "error: the emotty theme requires the emotty plugin" >&2 + return 1 +} + +(( ${+emoji} )) || { + echo "error: the emotty theme requires the emoji plugin" >&2 + return 1 +} + user_prompt="$(emotty)" root_prompt="$emoji[skull]" warn_prompt="$emoji[collision_symbol]" |