mirror of https://gitlab.com/ceda_ei/wish
Add custom_text, exit_code_smiley plugins
This commit is contained in:
parent
25e5c14130
commit
713da785c4
|
@ -0,0 +1,18 @@
|
||||||
|
function wish_custom_text_start() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function wish_custom_text_end() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function wish_custom_text_set_colors() {
|
||||||
|
WISH_CUSTOM_TEXT_FG=${WISH_CUSTOM_TEXT_FG:-$WISH_DEFAULT_FG}
|
||||||
|
WISH_CUSTOM_TEXT_BG=${WISH_CUSTOM_TEXT_BG:-$WISH_DEFAULT_BG}
|
||||||
|
local default_text='To set custom text here, add WISH_CUSTOM_TEXT="your text" in ~/.bashrc'
|
||||||
|
WISH_CUSTOM_TEXT=${WISH_CUSTOM_TEXT:-$default_text}
|
||||||
|
}
|
||||||
|
|
||||||
|
function wish_custom_text_main() {
|
||||||
|
wish_append $WISH_CUSTOM_TEXT_BG $WISH_CUSTOM_TEXT_FG "$WISH_CUSTOM_TEXT"
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
function wish_exit_code_smiley_start() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function wish_exit_code_smiley_end() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function wish_exit_code_smiley_set_colors() {
|
||||||
|
WISH_EXIT_CODE_SMILEY_FG=${WISH_EXIT_CODE_SMILEY_FG:-$WISH_DEFAULT_FG}
|
||||||
|
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:- :( }
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
else
|
||||||
|
wish_append $WISH_EXIT_CODE_SMILEY_BG $WISH_EXIT_CODE_SMILEY_FG "$WISH_EXIT_CODE_SMILEY_FAIL"
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in New Issue