From cf37697920019c44245ba3e5b69fed68c8c3fff4 Mon Sep 17 00:00:00 2001 From: Sachin George Thomas Date: Wed, 2 Nov 2016 20:22:14 +0530 Subject: node: open module-specific node documentation (#5572) --- plugins/node/node.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/node') 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" } -- cgit v1.2.3-70-g09d2 From fe96d194210854e2dc170a226b166253091f2fc0 Mon Sep 17 00:00:00 2001 From: hjpotter92 Date: Fri, 11 Nov 2016 07:47:43 +0530 Subject: Update endpoint from HTTP to HTTPS (#5622) --- plugins/node/node.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/node') diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh index e2f18a032..e196662c7 100644 --- a/plugins/node/node.plugin.zsh +++ b/plugins/node/node.plugin.zsh @@ -2,5 +2,5 @@ # TODO: Make the section part easier to use. function node-docs { local section=${1:-all} - open_command "http://nodejs.org/docs/$(node --version)/api/$section.html" + open_command "https://nodejs.org/docs/$(node --version)/api/$section.html" } -- cgit v1.2.3-70-g09d2 From af7d165a7f84f83a4c5d9f434a5320a5844d8ad3 Mon Sep 17 00:00:00 2001 From: Denys Dovhan Date: Wed, 3 Oct 2018 18:59:30 +0300 Subject: node: add README (#7201) --- plugins/node/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/node/README.md (limited to 'plugins/node') diff --git a/plugins/node/README.md b/plugins/node/README.md new file mode 100644 index 000000000..c392dc0bf --- /dev/null +++ b/plugins/node/README.md @@ -0,0 +1,16 @@ +# node plugin + +To use it, add `node` to the plugins array of your zshrc file: +```zsh +plugins=(... node) +``` + +This plugin adds `node-docs` function that open specific section in [Node.js](https://nodejs.org) documentation (depending on the installed version). +For example: + +```zsh +# Opens https://nodejs.org/docs/latest-v10.x/api/fs.html +$ node-docs fs +# Opens https://nodejs.org/docs/latest-v10.x/api/path.html +$ node-docs path +``` -- cgit v1.2.3-70-g09d2