Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed opening documentation on Linux (node)

  • Loading branch information...
commit 300118ec05e6a88d8331c007d076ec1fbf9c5e9c 1 parent 434f3bc
@dchusovitin dchusovitin authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 plugins/node/node.plugin.zsh
View
10 plugins/node/node.plugin.zsh
@@ -1,5 +1,13 @@
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
function node-docs {
- open "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
+ # get the open command
+ local open_cmd
+ if [[ $(uname -s) == 'Darwin' ]]; then
+ open_cmd='open'
+ else
+ open_cmd='xdg-open'
+ fi
+
+ $open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
}
Please sign in to comment.
Something went wrong with that request. Please try again.