Refactor Ruby aliases

This commit is contained in:
Sorin Ionescu 2012-08-14 21:10:12 -04:00
parent e03b8b9004
commit 3ec4fff033
2 changed files with 24 additions and 17 deletions

View file

@ -38,19 +38,23 @@ dependencies, with [Bundler][4].
Aliases Aliases
------- -------
### General
- `rb` is short for `ruby`.
### Bundler ### Bundler
- `b` manages ruby dependencies (`bundle`). - `rbb` manages ruby dependencies (`bundle`).
- `be` executes a script in the context of the current bundle. - `rbbe` executes a script in the context of the current bundle.
- `bi` installs the gems specified in the *Gemfile* in *vendor/bundle*. - `rbbi` installs the gems specified in the *Gemfile* in *vendor/bundle*.
- `bI` installs the following: - `rbbI` installs the following:
- gems specified in the *Gemfile* in *vendor/bundle*. - gems specified in the *Gemfile* in *vendor/bundle*.
- packages the gems into *vendor/cache*. - packages the gems into *vendor/cache*.
- appends bundler directories to *.gitignore*. - appends bundler directories to *.gitignore*.
- `bl` lists all gems in the current bundle. - `rbbl` lists all gems in the current bundle.
- `bo` opens an installed gem in the editor. - `rbbo` opens an installed gem in the editor.
- `bp` packages gem files into *vendor/cache*. - `rbbp` packages gem files into *vendor/cache*.
- `bu` updates gems to their latest version. - `rbbu` updates gems to their latest version.
Authors Authors
------- -------

View file

@ -40,17 +40,20 @@ fi
# Aliases # Aliases
# #
# General
alias rb='ruby'
# Bundler # Bundler
if (( $+commands[bundle] )); then if (( $+commands[bundle] )); then
alias b='bundle' alias rbb='bundle'
alias be='b exec' alias rbbe='rbb exec'
alias bi='b install --path vendor/bundle' alias rbbi='rbb install --path vendor/bundle'
alias bl='b list' alias rbbl='rbb list'
alias bo='b open' alias rbbo='rbb open'
alias bp='b package' alias rbbp='rbb package'
alias bu='b update' alias rbbu='rbb update'
alias bI='bi \ alias rbbI='rbbi \
&& b package \ && rbb package \
&& print .bundle >>! .gitignore \ && print .bundle >>! .gitignore \
&& print vendor/bundle >>! .gitignore \ && print vendor/bundle >>! .gitignore \
&& print vendor/cache >>! .gitignore' && print vendor/cache >>! .gitignore'