Add/update plugins: brew, rvm, node, npm, pow, and thor. #366

Merged
merged 11 commits into from May 29, 2011

Conversation

Projects
None yet
4 participants
Contributor

betawaffle commented May 28, 2011

Added a couple new plugins, added some helpers to others, and made a few minor tweaks (missing eof newlines and such).

betawaffle added some commits May 28, 2011

@betawaffle betawaffle Ruby Switching Helpers
Add helper functions to switch gemsets on ruby-1.8.7-p334 and ruby-1.9.2-p180.
Add completion definitions for helper functions.
3e43316
@betawaffle betawaffle Helpful Listing Aliases
Add alias to list installed rubies. Add alias to list gemsets in active ruby.
e703c95
@betawaffle betawaffle RVM Update Helpers
Add helper function to get rvm head. Add helper function to link zsh
completion that comes with rvm into om-my-zsh plugin directory, but don't
overwrite the completion that comes with oh-my-zsh (oh-my-zsh's completion is
better, but I want to be able to compare).
9f34bbe
@betawaffle betawaffle Gem List Helper
Add helper function to list gems in a pretty way (only with rvm, for now). Add
missng EOF newline and a todo to the ruby plugin.
572b27b
@betawaffle betawaffle Brew Plugin
Merge completion with official brew completion. Add a helper to link official
completion into oh-my-zsh plugin (without overwriting). Add an alias to list
installed brews. Add brews to the path (in a somewhat strange way).
e263f1f
@betawaffle betawaffle Pow! Restart Helper
Add helper function to restart an app running on Pow!
befb02e
@betawaffle betawaffle Node.js Helpers
Add helper function to open node api in browser. Add binaries installed via
npm to path. Tell node where to find things (what things?).
d72b9c5
@betawaffle betawaffle OS X Helpers
Add helper aliases for show/hide files. Add helper alias to recursively delete
.DS_Store files.
18293cd
@betawaffle betawaffle Cleanup
Add missing newlines at EOF. Remove redundant comment. Fix grammar in comment.
ace84c8
@betawaffle betawaffle Thor
Add plugin with completion for thor.
18bfb14
@betawaffle betawaffle Merge branch 'plugins' 6b86636
Owner

robbyrussell commented May 29, 2011

Thanks for the contribution! In the future, I prefer bite sized pull requests, but these were easy enough to scan through and test.

For the new plugins, could you update our wiki page with some descriptions/usage examples?

Thanks again!

Cheers,
Robby

@robbyrussell robbyrussell added a commit that referenced this pull request May 29, 2011

@robbyrussell robbyrussell Merge pull request #366 from betawaffle/master
Add/update plugins: brew, rvm, node, npm, pow, and thor.
40a737e

@robbyrussell robbyrussell merged commit 40a737e into robbyrussell:master May 29, 2011

Contributor

sorin-ionescu commented May 30, 2011

@robbyrussell Please keep pull requests open for a couple of days to allow others to review them and provide feedback.

_brew and brew.plugin.zsh

Messing with people's $PATH without their approval is a terrible idea because most have set their path to their liking in ~/.zshenv or ~/.zshrc. If you want to override system Ruby, use RVM.

Why link _brew.official and still maintain _brew when brew_zsh_completion.zsh can be instead sourced for always up to date completion?

cap.plugin.zsh

This is not a plugin but a completion file; so, one of us should create a proper _cap completion file.

node.plugin.zsh

As of npm 1.0, modules can be installed all over the place. Don't hard code $NODE_PATH. Let the user populate it ~/.zshenv or ~/.zshrc.

node-api is not very descriptive. node-docs makes more sense. Nevertheless, this is useful; thank you.

npm.plugin.zsh

Again, don't mess with people's $PATH without permission. Also, as of npm 1.0, /usr/local/share/npm/bin is no longer valid. It properly installs executables in /usr/local/bin when the global flag is passed to the install command. Otherwise, the bin directory can be all over the place.

rvm.plugin.zsh

These two lines must be removed.

autoload -U compinit
compinit -i

Why link _rvm.official and still maintain _rvm when the official _rvm can be instead sourced for always up to date completion?

New lines

Please leave new lines at the end of the files alone. They are useful for displaying the prompt properly after the cat command.


Thank you.

Contributor

betawaffle commented May 30, 2011

Thank you for your input sorin-ionescu. All of your points make sense. I'm new to this, I wasn't expecting it to necessarily be pulled in right away. If there was something wrong with it, I was hoping someone would tell me so I can fix it before it was pulled.

Now, here are my responses to the problems you raised:

_brew.official and _rvm.official

I wanted to keep the ones from omz active because they seem to be better. But I kept forgetting where the official files were stored (I like to diff the two versions when I update). I probably should have thought this one through a bit more, sorry.

cap

I didn't write that file, just fixed a missing newline I found.

node-api

I will change it to node-docs, but the real problem I see is that it uses open which afaik only works on OS X.

rvm compinit

Those lines were added when I was rebasing, I didn't want to undo something someone just pushed.

newlines

Which newlines do you have a problem with? I only added ones that were missing at the end of file.

@betawaffle betawaffle added a commit to betawaffle/oh-my-zsh that referenced this pull request May 30, 2011

@betawaffle betawaffle Rollback of Pull #366
sorin-ionescu had some good points.
1e3b441

@robbyrussell robbyrussell added a commit that referenced this pull request Jun 1, 2011

@robbyrussell robbyrussell Merge pull request #375 from betawaffle/rollback-366
Rollback of Pull #366
643a4e7

@martinklepsch martinklepsch pushed a commit to martinklepsch/oh-my-zsh that referenced this pull request Sep 23, 2011

@betawaffle betawaffle + Martin Klepsch Rollback of Pull #366
sorin-ionescu had some good points.
9d2f9ee

@mikehale mikehale added a commit to mikehale/oh-my-zsh that referenced this pull request Dec 4, 2011

@betawaffle @mikehale betawaffle + mikehale Rollback of Pull #366
sorin-ionescu had some good points.
be3c6e5

@sorin-ionescu sorin-ionescu referenced this pull request in sorin-ionescu/prezto Jan 24, 2012

@robbyrussell robbyrussell Merge pull request #366 from betawaffle/master
Add/update plugins: brew, rvm, node, npm, pow, and thor.
79d0205

@sorin-ionescu sorin-ionescu referenced this pull request in sorin-ionescu/prezto Jan 24, 2012

@betawaffle betawaffle Rollback of Pull #366
sorin-ionescu had some good points.
80ed1cb

@sorin-ionescu sorin-ionescu referenced this pull request in sorin-ionescu/prezto Jan 24, 2012

@robbyrussell robbyrussell Merge pull request #375 from betawaffle/rollback-366
Rollback of Pull #366
12fa2fc

@vguerci vguerci pushed a commit to vguerci/oh-my-zsh that referenced this pull request Feb 6, 2013

@sorin-ionescu sorin-ionescu [Fix #366] Distinct position with red b531191

@trabianmatt trabianmatt added a commit to trabianmatt/oh-my-zsh that referenced this pull request Apr 1, 2013

@betawaffle @trabianmatt betawaffle + trabianmatt Rollback of Pull #366
sorin-ionescu had some good points.
3f9e576

roolo commented Oct 23, 2013

Homebrew requires /usr/local/bin and /usr/local/sbin in path so why shall be bad something like export PATH="/usr/local/bin:/usr/local/sbin:$PATH"? The PATH is there as it was modified on another places and if you use Homebrew, you need it in your path anyway. Otherwise it'll not work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment