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 +++-- net:foret/completion/_sdk-factory.sh | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'net:foret') 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// -/} diff --git a/net:foret/completion/_sdk-factory.sh b/net:foret/completion/_sdk-factory.sh index d3face0..762b1e3 100644 --- a/net:foret/completion/_sdk-factory.sh +++ b/net:foret/completion/_sdk-factory.sh @@ -1,7 +1,6 @@ #compdef sdk-factory.sh local arguments - arguments=( '(-s)'{-a,--enable-all-protocols}'[Enable all protocols]' {-c+,--config=}'[Selects config FILE to use]:file:_files' @@ -20,5 +19,5 @@ arguments=( echo $TARGET$i)))' ) -_arguments -s $arguments +_arguments $arguments -- cgit v1.2.3