mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Use bundler if available
This commit is contained in:
parent
2190f8771f
commit
a6124875ef
1 changed files with 9 additions and 1 deletions
|
|
@ -2,6 +2,14 @@ fpath=($ZSH/plugins/rails $fpath)
|
|||
autoload -U compinit
|
||||
compinit -i
|
||||
|
||||
function _bundle_command {
|
||||
if command -v bundle; then
|
||||
bundle exec $@
|
||||
else
|
||||
$@
|
||||
fi
|
||||
}
|
||||
|
||||
function _rails_command () {
|
||||
if [ -e "script/server" ]; then
|
||||
ruby script/$@
|
||||
|
|
@ -19,4 +27,4 @@ alias rc='_rails_command console'
|
|||
alias rdb='_rails_command dbconsole'
|
||||
alias rdbm='rake db:migrate db:test:clone'
|
||||
alias devlog='tail -f log/development.log'
|
||||
alias cuke='bundle exec cucumber'
|
||||
alias cuke='_bundle_command cucumber'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue