From 1c2b5d54c49a646e55dfad8d45e340db31e4ad8f Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 12 Jun 2012 14:41:06 +0200 Subject: fjdkqslmifoperklmc,qkomp --- net:foret/Prompts.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'net:foret/Prompts.zsh') diff --git a/net:foret/Prompts.zsh b/net:foret/Prompts.zsh index aabec41..cd02381 100644 --- a/net:foret/Prompts.zsh +++ b/net:foret/Prompts.zsh @@ -43,15 +43,16 @@ __verbose_compilation () __nproc_compilation () { - NPROC=${NPROC:-$(echo $MAKEFLAGS | sed '/j[0-9]\+/!d;s/.*j\([0-9]\+\).*/\1/')} + NPROC=${NPROC:-0} + [ $(($NPROC)) -gt 0 ] || { unset NPROC ; return } - [ -n "$NPROC" -a "$NPROC" -gt 0 ] || ( unset NPROC ; exit 0 ) echo -n $C_ export | grep -q '^NPROC=' && echo -n "1;" echo -n $_make_colors[nproc]$_C$(for i in {1..$NPROC} ; echo -n -n "|") } __makeflags () { + [ -z "$MAKEFLAGS" ] && exit echo -n $C_ export | grep -q '^MAKEFLAGS=' && echo -n "1;" echo -n $_prompt_colors[soft_generic]";3"$_C${MAKEFLAGS// -/} -- cgit v1.2.3