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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - 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.