summaryrefslogtreecommitdiff
path: root/plugins/bundler
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2014-06-30 21:00:53 -0700
committerRobby Russell <robby@planetargon.com>2014-06-30 21:00:53 -0700
commit4131a59d1a57d53bf711115317116a6c57483636 (patch)
treec3b2a746fdc18708b4c18b33c4475f20bf9d4e61 /plugins/bundler
parent3913106b2e7127d396f27b652df812340ec0c871 (diff)
parent08632bb1780d51f6748b5c09ef5232862313f78f (diff)
downloadzsh-4131a59d1a57d53bf711115317116a6c57483636.tar.gz
zsh-4131a59d1a57d53bf711115317116a6c57483636.tar.bz2
zsh-4131a59d1a57d53bf711115317116a6c57483636.zip
Merge pull request #2827 from ncanceill/easymerge
...you folks are amazing. :-) "Easy-to-merge"
Diffstat (limited to 'plugins/bundler')
-rw-r--r--plugins/bundler/bundler.plugin.zsh9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index 3338d78be..20931dcef 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -3,10 +3,11 @@ alias bl="bundle list"
alias bp="bundle package"
alias bo="bundle open"
alias bu="bundle update"
+alias bi="bundle_install"
# The following is based on https://github.com/gma/bundler-exec
-bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor taps thin thor unicorn unicorn_rails)
+bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork spring strainer tailor taps thin thor unicorn unicorn_rails)
# Remove $UNBUNDLED_COMMANDS from the bundled_commands list
for cmd in $UNBUNDLED_COMMANDS; do
@@ -15,7 +16,7 @@ done
## Functions
-bi() {
+bundle_install() {
if _bundler-installed && _within-bundled-project; then
local bundler_version=`bundle version | cut -d' ' -f3`
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
@@ -39,8 +40,8 @@ _bundler-installed() {
}
_within-bundled-project() {
- local check_dir=$PWD
- while [ $check_dir != "/" ]; do
+ local check_dir="$PWD"
+ while [ "$check_dir" != "/" ]; do
[ -f "$check_dir/Gemfile" ] && return
check_dir="$(dirname $check_dir)"
done