diff options
author | Robby Russell <robby@planetargon.com> | 2014-07-15 07:40:48 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-07-15 07:40:48 -0700 |
commit | c925aabea9b8b0578735fab4c75bec86e4d20f16 (patch) | |
tree | 5f1d1ad05977ecc48fde10afdfbfb983291fab1e /plugins/bundler/bundler.plugin.zsh | |
parent | 6eefbe24a3cbdae5ef929744da467a705f3bf054 (diff) | |
parent | 480ca2205846426c04fa46fb37e1f7246bba2b88 (diff) | |
download | zsh-c925aabea9b8b0578735fab4c75bec86e4d20f16.tar.gz zsh-c925aabea9b8b0578735fab4c75bec86e4d20f16.tar.bz2 zsh-c925aabea9b8b0578735fab4c75bec86e4d20f16.zip |
Merge pull request #2885 from tsujigiri/bundler/run_binstubbed
Make bundler plugin run binstubbed cmd if existing
Diffstat (limited to 'plugins/bundler/bundler.plugin.zsh')
-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 20931dcef..fbdbc0244 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -48,9 +48,17 @@ _within-bundled-project() { false } +_binstubbed() { + [ -f "./bin/${1}" ] +} + _run-with-bundler() { if _bundler-installed && _within-bundled-project; then - bundle exec $@ + if _binstubbed $1; then + bundle exec "./bin/$@" + else + bundle exec $@ + fi else $@ fi |