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
lsd: ls -d
rsearch = search --remote
Now you can use them!
$ gem lsd
*** expanding lsd to ls -d ***
*** expanding ls -d to list -d ***
actionmailer (3.2.6)
<snip>
Verbose expansion message above can be suppressed with the :verbose
configuration.
You can list the definitions by gem aliases
:
ls = list
lsd = ls -d
rsearch = 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.