mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-23 20:16:17 +08:00
Support of parallel bundle install
This commit is contained in:
parent
434f3bc05c
commit
69ce2362d6
|
@ -1,10 +1,17 @@
|
||||||
alias be="bundle exec"
|
alias be="bundle exec"
|
||||||
alias bi="bundle install"
|
|
||||||
alias bl="bundle list"
|
alias bl="bundle list"
|
||||||
alias bp="bundle package"
|
alias bp="bundle package"
|
||||||
alias bo="bundle open"
|
alias bo="bundle open"
|
||||||
alias bu="bundle update"
|
alias bu="bundle update"
|
||||||
|
|
||||||
|
if [[ "$(uname)" == 'Darwin' ]]
|
||||||
|
then
|
||||||
|
local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
|
||||||
|
else
|
||||||
|
local cores_num="$(nproc)"
|
||||||
|
fi
|
||||||
|
eval "alias bi='bundle install --jobs=$cores_num'"
|
||||||
|
|
||||||
# The following is based on https://github.com/gma/bundler-exec
|
# The following is based on https://github.com/gma/bundler-exec
|
||||||
|
|
||||||
bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard jekyll kitchen knife middleman nanoc rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor thin thor unicorn unicorn_rails puma)
|
bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard jekyll kitchen knife middleman nanoc rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor thin thor unicorn unicorn_rails puma)
|
||||||
|
@ -42,3 +49,4 @@ for cmd in $bundled_commands; do
|
||||||
compdef _$cmd bundled_$cmd=$cmd
|
compdef _$cmd bundled_$cmd=$cmd
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user