diff options
-rw-r--r-- | net:foret/Prompts.zsh | 5 | ||||
-rw-r--r-- | net:foret/completion/_sdk-factory.sh | 3 |
2 files changed, 4 insertions, 4 deletions
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 |