feat(ruby): add new aliases rrun and rserver (#10218)

This commit is contained in:
Celestino Gomes 2021-12-29 05:44:08 -03:00 committed by GitHub
parent eb94df6428
commit cffa9a2fda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 19 deletions

View file

@ -10,22 +10,24 @@ plugins=(... ruby)
## Aliases ## Aliases
| Alias | Command | Description | | Alias | Command | Description |
|--------|----------------------------------------|------------------------------------------------------| | ------- | -------------------------------------- | ---------------------------------------------------- |
| rb | `ruby` | The Ruby command | | rb | `ruby` | The Ruby command |
| sgem | `sudo gem` | Run sudo gem on the system ruby, not the active ruby | | sgem | `sudo gem` | Run sudo gem on the system ruby, not the active ruby |
| rfind | `find . -name "*.rb" \| xargs grep -n` | Find ruby file | | rfind | `find . -name "*.rb" \| xargs grep -n` | Find ruby file |
| gein | `gem install` | Install a gem into the local repository | | rrun | `ruby -e` | Execute some code: E.g: `rrun "puts 'Hello world!'"` |
| geun | `gem uninstall` | Uninstall gems from the local repository | | rserver | `ruby -e httpd . -p 8080` | Start HTTP Webrick serving local directory/files |
| geli | `gem list` | Display gems installed locally | | gein | `gem install` | Install a gem into the local repository |
| gei | `gem info` | Show information for the given gem | | geun | `gem uninstall` | Uninstall gems from the local repository |
| geiall | `gem info --all` | Display all gem versions | | geli | `gem list` | Display gems installed locally |
| geca | `gem cert --add` | Add a trusted certificate | | gei | `gem info` | Show information for the given gem |
| gecr | `gem cert --remove` | Remove a trusted certificate | | geiall | `gem info --all` | Display all gem versions |
| gecb | `gem cert --build` | Build private key and self-signed certificate | | geca | `gem cert --add` | Add a trusted certificate |
| geclup | `gem cleanup -n` | Do not uninstall gem | | gecr | `gem cert --remove` | Remove a trusted certificate |
| gegi | `gem generate_index` | Generate index file for gem server | | gecb | `gem cert --build` | Build private key and self-signed certificate |
| geh | `gem help` | Provide additional help | | geclup | `gem cleanup -n` | Do not uninstall gem |
| gel | `gem lock` | Generate a lockdown list of gems | | gegi | `gem generate_index` | Generate index file for gem server |
| geo | `gem open` | Open gem source in default editor | | geh | `gem help` | Provide additional help |
| geoe | `gem open -e` | Open gem sources in preferred editor | | gel | `gem lock` | Generate a lockdown list of gems |
| geo | `gem open` | Open gem source in default editor |
| geoe | `gem open -e` | Open gem sources in preferred editor |

View file

@ -22,3 +22,5 @@ alias geh="gem help"
alias gel="gem lock" alias gel="gem lock"
alias geo="gem open" alias geo="gem open"
alias geoe="gem open -e" alias geoe="gem open -e"
alias rrun="ruby -e"
alias rserver="ruby -e httpd . -p 8080" # requires webrick