1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00

Make bundler plugin run binstubbed cmd if existing

This commit is contained in:
Helge Rausch 2014-06-16 16:11:59 +02:00
parent 3913106b2e
commit 480ca22058

View file

@ -47,9 +47,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