Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rollback of Pull #366 #375

Merged
merged 2 commits into from

4 participants

@betawaffle betawaffle Rollback of Pull #366
sorin-ionescu had some good points.
1e3b441
plugins/rvm/rvm.plugin.zsh
@@ -1,6 +1,5 @@
-fpath=($ZSH/plugins/rvm $fpath)
-autoload -U compinit
-compinit -i
+# What does this really do?
+# fpath=($ZSH/plugins/rvm $fpath)
@vguerci
vguerci added a note

it adds rvm plugin to $fpath which is used by compinit to load completions
Now useless and redundant since all plugins are already added to $fpath in main oh-my-zsh.sh script :
for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath)

Thanks.

You don't need that line. I have forgotten to mention it. I'm sorry for the confusion.

@vguerci
vguerci added a note

@sorin-ionescu don't be sorry about this, and btw, thanks for the extensive review of previous pull / related commits ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sorin-ionescu sorin-ionescu commented on the diff
plugins/node/node.plugin.zsh
((4 lines not shown))
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
-function node-api {
+function node-docs {
open "http://nodejs.org/docs/$(node --version)/api/all.html#$1"

xdg-open is available for Gnome, KDE, et al. You need to check if it's a Mac or everything else and execute the proper open command.

How do you recommend I check for darwin, or osx if that would be more accurate?

You can use uname, which says, 'Darwin'. Maybe, we should have a function in /lib/functions.zsh that deals with all the different open commands.

Alternatively, Instead of a function, one could set an alias in /lib/aliases.zsh like so.

if [[ $(uname) != 'Darwin' && -x "${+commands[xdg-open]}" ]]; then
  alias open='xdg-open'
fi

There are a bunch of open commands on different systems. I ask that people list them for us to implement a proper wrapper function or aliases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@robbyrussell robbyrussell merged commit 643a4e7 into robbyrussell:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 30, 2011
  1. @betawaffle

    Rollback of Pull #366

    betawaffle authored
    sorin-ionescu had some good points.
  2. @betawaffle

    Remove Uneeded Lines

    betawaffle authored
This page is out of date. Refresh to see the latest.
View
12 plugins/brew/brew.plugin.zsh
@@ -1,13 +1 @@
-# Move /usr/local/bin (path where brews are linked) to the front of the path
-# This will allow us to override system binaries like ruby with our brews
-# TODO: Do this in a more compatible way.
-# What if someone doesn't have /usr/bin in their path?
-export PATH=`echo $PATH | sed -e 's|/usr/local/bin||' -e 's|::|:|g'` # Remove /usr/local/bin
-export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/bin:&|'` # Add it in front of /usr/bin
-export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/sbin:&|'` # Add /usr/local/sbin
-
alias brews='brew list -1'
-
-function brew-link-completion {
- ln -s "$(brew --prefix)/Library/Contributions/brew_zsh_completion.zsh" "$ZSH/plugins/brew/_brew.official"
-}
View
5 plugins/node/node.plugin.zsh
@@ -1,8 +1,5 @@
-# This works if you installed node via homebrew.
-export NODE_PATH="/usr/local/lib/node"
-
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
-function node-api {
+function node-docs {
open "http://nodejs.org/docs/$(node --version)/api/all.html#$1"

xdg-open is available for Gnome, KDE, et al. You need to check if it's a Mac or everything else and execute the proper open command.

How do you recommend I check for darwin, or osx if that would be more accurate?

You can use uname, which says, 'Darwin'. Maybe, we should have a function in /lib/functions.zsh that deals with all the different open commands.

Alternatively, Instead of a function, one could set an alias in /lib/aliases.zsh like so.

if [[ $(uname) != 'Darwin' && -x "${+commands[xdg-open]}" ]]; then
  alias open='xdg-open'
fi

There are a bunch of open commands on different systems. I ask that people list them for us to implement a proper wrapper function or aliases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
View
2  plugins/npm/npm.plugin.zsh
@@ -1,2 +0,0 @@
-# TODO: Don't do this in such a weird way.
-export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/share/npm/bin:&|'`
View
8 plugins/rvm/rvm.plugin.zsh
@@ -1,7 +1,3 @@
-fpath=($ZSH/plugins/rvm $fpath)
-autoload -U compinit
-compinit -i
-
alias rubies='rvm list rubies'
alias gemsets='rvm gemset list'
@@ -35,10 +31,6 @@ function rvm-update {
rvm reload # TODO: Reload rvm completion?
}
-function rvm-link-completion {
- ln -s "$rvm_path/scripts/zsh/Completion/_rvm" "$ZSH/plugins/rvm/_rvm.official"
-}
-
# TODO: Make this usable w/o rvm.
function gems {
local current_ruby=`rvm-prompt i v p`
Something went wrong with that request. Please try again.