diff options
author | yleo77 <ylep77@gmail.com> | 2013-09-19 12:40:45 +0800 |
---|---|---|
committer | yleo77 <ylep77@gmail.com> | 2013-09-19 12:40:45 +0800 |
commit | 0240ac6496fc01b287caaab1a62cd760590144be (patch) | |
tree | 120cbd08b851e012d8843652ccf8bf89c5a023f7 /plugins/bundler | |
parent | fda5afaebca57250792696e29c2e111f41f6fce4 (diff) | |
parent | b51c2a0d0b0af68d4b2b70b922f7d56a14a23dcc (diff) | |
download | zsh-0240ac6496fc01b287caaab1a62cd760590144be.tar.gz zsh-0240ac6496fc01b287caaab1a62cd760590144be.tar.bz2 zsh-0240ac6496fc01b287caaab1a62cd760590144be.zip |
Merge remote-tracking branch 'robbyrussell/master'
Diffstat (limited to 'plugins/bundler')
-rw-r--r-- | plugins/bundler/bundler.plugin.zsh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index c01241409..1e70db6af 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -1,10 +1,17 @@ alias be="bundle exec" -alias bi="bundle install" alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" 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 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 fi done + |