From edc449275b6c04445f58b108ca0937a87c1e8430 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 27 Feb 2023 20:04:56 +0530 Subject: add zsh --- oh-my-zsh/plugins/rake/README.md | 41 ++++++++++++++++++++++++++++++++++ oh-my-zsh/plugins/rake/rake.plugin.zsh | 9 ++++++++ 2 files changed, 50 insertions(+) create mode 100644 oh-my-zsh/plugins/rake/README.md create mode 100644 oh-my-zsh/plugins/rake/rake.plugin.zsh (limited to 'oh-my-zsh/plugins/rake') diff --git a/oh-my-zsh/plugins/rake/README.md b/oh-my-zsh/plugins/rake/README.md new file mode 100644 index 0000000..72f2a85 --- /dev/null +++ b/oh-my-zsh/plugins/rake/README.md @@ -0,0 +1,41 @@ +# Rake plugin + +This plugin adds support for [rake](https://ruby.github.io/rake/), the Ruby +build tool or Ruby Make. + +To use it, add `rake` to the plugins array in your zshrc file: + +```zsh +plugins=(... rake) +``` + +## Aliases + +The plugin aliases the rake command so you can pass arguments when invoking rake tasks +without having to escape the brackets, i.e., you can run + +```sh +rake namespace:task['argument'] +``` + +instead of having to do + +```sh +rake namespace:task\['argument'\] +``` + +| Alias | Command | Description | +| ---------- | ------------------------------ | --------------------------------------------- | +| `rake` | `noglob rake` | Allows unescaped square brackets | +| `bin/rake` | `noglob bin/rake` | Same as above but using rake binstub | +| `brake` | `noglob bundle exec rake` | Same as above but call rake using bundler | +| `srake` | `noglob sudo rake` | Same as rake but using sudo | +| `sbrake` | `noglob sudo bundle exec rake` | Same as above but using both sudo and bundler | + +## Jim Weirich + +The plugin also aliases `rake` to [`jimweirich`](https://github.com/jimweirich), author of Rake +and big time contributor to the Ruby open source community. He passed away in 2014: + +> Thank you Jim for everything you contributed to the Ruby and open source community +> over the years. We will miss you dearly. — [**@robbyrussell**](https://github.com/ohmyzsh/ohmyzsh/commit/598a9c6f990756386517d66b6bcf77e53791e905) diff --git a/oh-my-zsh/plugins/rake/rake.plugin.zsh b/oh-my-zsh/plugins/rake/rake.plugin.zsh new file mode 100644 index 0000000..0c507e6 --- /dev/null +++ b/oh-my-zsh/plugins/rake/rake.plugin.zsh @@ -0,0 +1,9 @@ +# Thank you Jim for everything you contributed to the Ruby and open source community +# over the years. We will miss you dearly. +alias jimweirich='rake' + +alias rake='noglob rake' # allows square brackts for rake task invocation +alias 'bin/rake'='noglob bin/rake' # support use of binstub +alias brake='noglob bundle exec rake' # execute the bundled rake gem +alias srake='noglob sudo rake' # noglob must come before sudo +alias sbrake='noglob sudo bundle exec rake' # altogether now ... -- cgit v1.2.3