Gem::Alias

This gem adds alias expansion feature to the gem command.

You can define subcommand aliases via ~/.gemrc and list them by aliases subcommand.

Installation

$ gem install gem-alias

Usage

Add :aliases key to your ~/.gemrc and put definitions as a hash.

Example:

:aliases:
  upgrade = update
  ls = list
  search = search --remote

Now you can use them!

$ gem search rake
*** expanding search rake to search --remote rake

*** REMOTE GEMS ***
<snip>

Verbose expansion message above can be suppressed with the :verbose configuration.

You can list the definitions by gem aliases:

    ls = list
    search = search --remote
    upgrade = update

Note that this list is sorted.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

ToDo

  • Like normal commands, aliases should also be looked up with shorter, but unambiguous names.
  • Support multi-level expanstion without falling into infinite loop.