Browse Source

Refactor Ruby aliases

master
Sorin Ionescu 12 years ago
parent
commit
3ec4fff033
  1. 20
      modules/ruby/README.md
  2. 21
      modules/ruby/init.zsh

20
modules/ruby/README.md

@ -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
------- -------

21
modules/ruby/init.zsh

@ -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'

Loading…
Cancel
Save