diff options
author | Marvin Borner | 2019-03-05 01:09:01 +0100 |
---|---|---|
committer | Marvin Borner | 2019-03-05 01:09:01 +0100 |
commit | 55457187d18221e76bd12f0fb2cfab65c49b92fb (patch) | |
tree | 8db042d2d80710d54100c2709ad4332153ac848a /.oh-my-zsh/plugins/ruby |
Initial commit
Diffstat (limited to '.oh-my-zsh/plugins/ruby')
-rw-r--r-- | .oh-my-zsh/plugins/ruby/README.md | 20 | ||||
-rw-r--r-- | .oh-my-zsh/plugins/ruby/ruby.plugin.zsh | 14 |
2 files changed, 34 insertions, 0 deletions
diff --git a/.oh-my-zsh/plugins/ruby/README.md b/.oh-my-zsh/plugins/ruby/README.md new file mode 100644 index 0000000..ad2755b --- /dev/null +++ b/.oh-my-zsh/plugins/ruby/README.md @@ -0,0 +1,20 @@ +# Ruby plugin + +This plugin adds aliases for common commands used in dealing with [Ruby](https://www.ruby-lang.org/en/) and [gem packages](https://rubygems.org/). + +To use it, add `ruby` to the plugins array in your zshrc file: + +```zsh +plugins=(... ruby) +``` + +## Aliases + +| Alias | Command | Description | +|-------|----------------------------------------|------------------------------------------------------| +| rb | `ruby` | The Ruby command | +| sgem | `sudo gem` | Run sudo gem on the system ruby, not the active ruby | +| rfind | `find . -name "*.rb" \| xargs grep -n` | Find ruby file | +| gin | `gem install` | Install a gem into the local repository | +| gun | `gem uninstall` | Uninstall gems from the local repository | +| gli | `gem list` | Display gems installed locally | diff --git a/.oh-my-zsh/plugins/ruby/ruby.plugin.zsh b/.oh-my-zsh/plugins/ruby/ruby.plugin.zsh new file mode 100644 index 0000000..177b35b --- /dev/null +++ b/.oh-my-zsh/plugins/ruby/ruby.plugin.zsh @@ -0,0 +1,14 @@ +# TODO: Make this compatible with rvm. +# Run sudo gem on the system ruby, not the active ruby. +alias sgem='sudo gem' + +# Find ruby file +alias rfind='find . -name "*.rb" | xargs grep -n' + +# Shorthand Ruby +alias rb="ruby" + +# Gem Command Shorthands +alias gin="gem install" +alias gun="gem uninstall" +alias gli="gem list" |