summaryrefslogtreecommitdiff
path: root/plugins/bundler
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2019-05-08 20:40:36 +0200
committerGitHub <noreply@github.com>2019-05-08 20:40:36 +0200
commit0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534 (patch)
tree946d9f8b758ebdd63da96152ca56b154c99068da /plugins/bundler
parentafb028763cf40fc339e49011b2cba124dc108fcb (diff)
parentebc700be9b2fa7ae770a644093a5c46a8e323726 (diff)
downloadzsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.tar.gz
zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.tar.bz2
zsh-0232ac4bb1cb64b5bfaa7e5fc979d6f7ab23e534.zip
Merge branch 'master' into master
Diffstat (limited to 'plugins/bundler')
-rw-r--r--plugins/bundler/README.md6
-rw-r--r--plugins/bundler/bundler.plugin.zsh10
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md
index 04d551447..dc2f17008 100644
--- a/plugins/bundler/README.md
+++ b/plugins/bundler/README.md
@@ -2,7 +2,8 @@
- adds completion for basic bundler commands
- adds short aliases for common bundler commands
- - `be` aliased to `bundle exec`
+ - `be` aliased to `bundle exec`.
+ It also supports aliases (if `rs` is `rails server`, `be rs` will bundle-exec `rails server`).
- `bl` aliased to `bundle list`
- `bp` aliased to `bundle package`
- `bo` aliased to `bundle open`
@@ -13,7 +14,8 @@
- looks for a binstub under `./bin/` and executes it (if present)
- calls `bundle exec <gem executable>` otherwise
-For a full list of *common gems* being wrapped by default please look at the `bundler.plugin.zsh` file.
+Common gems wrapped by default (by name of the executable):
+`annotate`, `cap`, `capify`, `cucumber`, `foodcritic`, `guard`, `hanami`, `irb`, `jekyll`, `kitchen`, `knife`, `middleman`, `nanoc`, `pry`, `puma`, `rackup`, `rainbows`, `rake`, `rspec`, `shotgun`, `sidekiq`, `spec`, `spork`, `spring`, `strainer`, `tailor`, `taps`, `thin`, `thor`, `unicorn` and `unicorn_rails`.
## Configuration
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index 6b10b78d1..668e15d2f 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -54,10 +54,14 @@ done
## Functions
bundle_install() {
- if _bundler-installed && _within-bundled-project; then
+ if ! _bundler-installed; then
+ echo "Bundler is not installed"
+ elif ! _within-bundled-project; then
+ echo "Can't 'bundle install' outside a bundled project"
+ else
local bundler_version=`bundle version | cut -d' ' -f3`
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
- if [[ "$OSTYPE" = darwin* ]]
+ if [[ "$OSTYPE" = (darwin|freebsd)* ]]
then
local cores_num="$(sysctl -n hw.ncpu)"
else
@@ -67,8 +71,6 @@ bundle_install() {
else
bundle install $@
fi
- else
- echo "Can't 'bundle install' outside a bundled project"
fi
}