From f1b966c5e0d515532d5ad3cad48d19aa6a7f0412 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Fri, 29 Mar 2019 02:26:12 +0530 Subject: [PATCH] Add EXIT_CODE_SMILEY_HIDE_ON_PASS --- plugins/exit_code_smiley.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/exit_code_smiley.sh b/plugins/exit_code_smiley.sh index b8cd09c..cd2352e 100644 --- a/plugins/exit_code_smiley.sh +++ b/plugins/exit_code_smiley.sh @@ -11,11 +11,14 @@ function wish_exit_code_smiley_set_colors() { WISH_EXIT_CODE_SMILEY_BG=${WISH_EXIT_CODE_SMILEY_BG:-$WISH_DEFAULT_BG} WISH_EXIT_CODE_SMILEY_PASS=${WISH_EXIT_CODE_SMILEY_PASS:- :) } WISH_EXIT_CODE_SMILEY_FAIL=${WISH_EXIT_CODE_SMILEY_FAIL:- :( } + WISH_EXIT_CODE_SMILEY_HIDE_ON_PASS=${WISH_EXIT_CODE_SMILEY_HIDE_ON_PASS:-0} } function wish_exit_code_smiley_main() { if [[ $1 == 0 ]]; then - wish_append $WISH_EXIT_CODE_SMILEY_BG $WISH_EXIT_CODE_SMILEY_FG "$WISH_EXIT_CODE_SMILEY_PASS" + if [[ $WISH_EXIT_CODE_SMILEY_HIDE_ON_PASS == 0 ]]; then + wish_append $WISH_EXIT_CODE_SMILEY_BG $WISH_EXIT_CODE_SMILEY_FG "$WISH_EXIT_CODE_SMILEY_PASS" + fi else wish_append $WISH_EXIT_CODE_SMILEY_BG $WISH_EXIT_CODE_SMILEY_FG "$WISH_EXIT_CODE_SMILEY_FAIL" fi