summaryrefslogtreecommitdiff
path: root/plugins/node/node.plugin.zsh
diff options
context:
space:
mode:
authorAndrew Hodges <betawaffle@gmail.com>2011-05-28 11:20:48 -0400
committerAndrew Hodges <betawaffle@gmail.com>2011-05-28 11:20:48 -0400
commitd72b9c5ec5d55765998bb301b3425fbe84012c1f (patch)
treef3150070669660a71cf8434ef51d62b418819bad /plugins/node/node.plugin.zsh
parentbefb02e3da0573fa788114e1c18c70b75f787f1f (diff)
downloadzsh-d72b9c5ec5d55765998bb301b3425fbe84012c1f.tar.gz
zsh-d72b9c5ec5d55765998bb301b3425fbe84012c1f.tar.bz2
zsh-d72b9c5ec5d55765998bb301b3425fbe84012c1f.zip
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?).
Diffstat (limited to 'plugins/node/node.plugin.zsh')
-rw-r--r--plugins/node/node.plugin.zsh8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh
new file mode 100644
index 000000000..18f35333c
--- /dev/null
+++ b/plugins/node/node.plugin.zsh
@@ -0,0 +1,8 @@
+# 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 {
+ open "http://nodejs.org/docs/$(node --version)/api/all.html#$1"
+}