300118ec05e6a88d8331c007d076ec1fbf9c5e9c

Author
dchusovitin <dchusovitin@gmail.com>
Committer
dchusovitin <dchusovitin@gmail.com>
Date

Message

Fixed opening documentation on Linux (node)

Diff

 1diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh
 2index 3bbed6f04c5a165465b63b7c64f24153585645f5..2d78f2b4c45a138333cb907ebf26fe9b30a0de3a 100644
 3--- a/plugins/node/node.plugin.zsh
 4+++ b/plugins/node/node.plugin.zsh
 5@@ -1,5 +1,13 @@
 6 # Open the node api for your current version to the optional section.
 7 # TODO: Make the section part easier to use.
 8 function node-docs {
 9-	open "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
10+  # get the open command
11+  local open_cmd
12+  if [[ $(uname -s) == 'Darwin' ]]; then
13+    open_cmd='open'
14+  else
15+    open_cmd='xdg-open'
16+  fi
17+
18+  $open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
19 }