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
-------
### General
- `rb` is short for `ruby`.
### Bundler
- `b` manages ruby dependencies (`bundle`).
- `be` executes a script in the context of the current bundle.
- `bi` installs the gems specified in the *Gemfile* in *vendor/bundle*.
- `bI` installs the following:
- `rbb` manages ruby dependencies (`bundle`).
- `rbbe` executes a script in the context of the current bundle.
- `rbbi` installs the gems specified in the *Gemfile* in *vendor/bundle*.
- `rbbI` installs the following:
- gems specified in the *Gemfile* in *vendor/bundle*.
- packages the gems into *vendor/cache*.
- appends bundler directories to *.gitignore*.
- `bl` lists all gems in the current bundle.
- `bo` opens an installed gem in the editor.
- `bp` packages gem files into *vendor/cache*.
- `bu` updates gems to their latest version.
- `rbbl` lists all gems in the current bundle.
- `rbbo` opens an installed gem in the editor.
- `rbbp` packages gem files into *vendor/cache*.
- `rbbu` updates gems to their latest version.
Authors
-------

View file

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