summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSachin George Thomas <sachq@users.noreply.github.com>2016-11-02 20:22:14 +0530
committerMarc Cornellà <marc.cornella@live.com>2016-11-02 15:52:14 +0100
commitcf37697920019c44245ba3e5b69fed68c8c3fff4 (patch)
tree5a5f7e98b56f240d3450171ad44c944046d4ab73
parent2d964086af95f4b46589459643f20ca00bbb8102 (diff)
downloadzsh-cf37697920019c44245ba3e5b69fed68c8c3fff4.tar.gz
zsh-cf37697920019c44245ba3e5b69fed68c8c3fff4.tar.bz2
zsh-cf37697920019c44245ba3e5b69fed68c8c3fff4.zip
node: open module-specific node documentation (#5572)
-rw-r--r--plugins/node/node.plugin.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh
index 2463815ac..e2f18a032 100644
--- a/plugins/node/node.plugin.zsh
+++ b/plugins/node/node.plugin.zsh
@@ -1,5 +1,6 @@
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
function node-docs {
- open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
+ local section=${1:-all}
+ open_command "http://nodejs.org/docs/$(node --version)/api/$section.html"
}