summaryrefslogtreecommitdiff
path: root/net:foret
diff options
context:
space:
mode:
Diffstat (limited to 'net:foret')
-rw-r--r--net:foret/Prompts.zsh16
1 files changed, 14 insertions, 2 deletions
diff --git a/net:foret/Prompts.zsh b/net:foret/Prompts.zsh
index cf741c0..817330f 100644
--- a/net:foret/Prompts.zsh
+++ b/net:foret/Prompts.zsh
@@ -13,14 +13,26 @@ _prompt_colors[target]="1;31"
__compilation ()
{
unset COMPILATION
- if [ -n "$TARGET" -o $((${V:-0} + ${NPROC:-0})) -gt 0 ]
+ if [ -n "$TARGET" -o -n "$STATIC" -o -n "$DYNAMIC" -o $(( ${V:-0} + ${NPROC:-0} )) -gt 0 ]
then
COMPILATION="["
- COMPILATION+=$C_$_make_colors[target]$_C${TARGET:+$TARGET}$C_$_prompt_colors[soft_generic]$_C
+
+ [ $(( ${STATIC:-$(( 1 ^ ${DYNAMIC:-0} ))} + ${DYNAMIC:-$(( 1 ^ ${STATIC:-0} ))} )) -lt 2 ] && \
+ case "${STATIC:-$(( 1 ^ ${DYNAMIC:-0} ))}${DYNAMIC:-$((1 ^ ${STATIC:-0}))}" in
+ "10")
+ COMPILATION+=$C_$_make_colors[dynamic]$_C"static"$C_$_prompt_colors[soft_generic]$_C ;;
+ "01")
+ COMPILATION+=$C_$_make_colors[target]$_C"dynamic"$C_$_prompt_colors[soft_generic]$_C ;;
+ esac
+
+ COMPILATION+=$C_$_make_colors[target]$_C$TARGET$C_$_prompt_colors[soft_generic]$_C
+
[ -n "$V" -a "$V" -gt 0 ] && \
COMPILATION+=$C_$_make_colors[verbose]$_C$(for i in {1..$V} ; echo -n "V")$C_$_prompt_colors[soft_generic]$_C
+
[ -n "$NPROC" -a "$NPROC" -gt 0 ] && \
COMPILATION+=$C_$_make_colors[nproc]$_C$(for i in {1..$NPROC} ; echo -n "|")$C_$_prompt_colors[soft_generic]$_C
+
COMPILATION+="] "
fi
}