[Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-532-gd54db35
Igor Murzov
e-mail at date.by
Wed Nov 9 20:20:40 UTC 2011
> + local var=NPROCESSORS_ONLN
> + [[ $OSTYPE == *linux* ]] && var=_$var
> + local n=$( getconf $var 2>/dev/null )
> + printf %s ${n:-1}
I don't know why, but on my system getconf works differently (note the leading underscore in the variable name):
$ LANG=C getconf NPROCESSORS_ONLN
getconf: Unrecognized variable `NPROCESSORS_ONLN'
$ getconf _NPROCESSORS_ONLN
1
Also, I think that number of cpus is not a good maximum. I do use `make -j2` or `make -j3` on single core machines and this gives me better cpu utilisation. There is also things like hyper-threading. Maybe it's better to offer as completions numbers up to 2 * n or at least n + 2?
-- Igor
More information about the Bash-completion-devel
mailing list