mirror of https://gitlab.com/ceda_ei/wish
parent
2ffe6cfd47
commit
f1646abba6
|
@ -0,0 +1,22 @@
|
|||
function wish_bg_jobs_start() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function wish_bg_jobs_end() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function wish_bg_jobs_set_colors() {
|
||||
WISH_BG_JOBS_FG=${WISH_BG_JOBS_FG:-$WISH_DEFAULT_FG}
|
||||
WISH_BG_JOBS_BG=${WISH_BG_JOBS_BG:-$WISH_DEFAULT_BG}
|
||||
WISH_BG_JOBS_SUFFIX=${WISH_BG_JOBS_SUFFIX:-&}
|
||||
}
|
||||
|
||||
function wish_bg_jobs_main() {
|
||||
local x=$(jobs -p | wc -l)
|
||||
if [[ $x == 0 ]]; then
|
||||
wish_append $WISH_BG_JOBS_BG $WISH_BG_JOBS_FG ""
|
||||
else
|
||||
wish_append $WISH_BG_JOBS_BG $WISH_BG_JOBS_FG " $x$WISH_BG_JOBS_SUFFIX "
|
||||
fi
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
function wish_exit_code_start() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function wish_exit_code_end() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function wish_exit_code_set_colors() {
|
||||
WISH_EXIT_CODE_FG=${WISH_EXIT_CODE_FG:-$WISH_DEFAULT_FG}
|
||||
WISH_EXIT_CODE_BG=${WISH_EXIT_CODE_BG:-$WISH_DEFAULT_BG}
|
||||
}
|
||||
|
||||
function wish_exit_code_main() {
|
||||
if [[ $1 == 0 ]]; then
|
||||
wish_append $WISH_EXIT_CODE_BG $WISH_EXIT_CODE_FG ""
|
||||
else
|
||||
wish_append $WISH_EXIT_CODE_BG $WISH_EXIT_CODE_FG $1
|
||||
fi
|
||||
}
|
|
@ -26,7 +26,7 @@ function wish_vcs_main() {
|
|||
|
||||
local add=$(echo "$op" | awk '{a += $1} END {print a}')
|
||||
local del=$(echo "$op" | awk '{d += $2} END {print d}')
|
||||
if [[ $add != 0 ]] && [[ $del != 0 ]]; then
|
||||
if [[ $add != 0 ]] || [[ $del != 0 ]]; then
|
||||
git="$git+$add -$del "
|
||||
fi
|
||||
wish_append $WISH_VCS_BG $WISH_VCS_FG "$git"
|
||||
|
|
Loading…
Reference in New Issue