summaryrefslogtreecommitdiff
path: root/plugins/node
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2015-08-05 00:32:57 +0200
committerMarc Cornellà <marc.cornella@live.com>2015-08-05 00:57:40 +0200
commitd1d06b5675bebbe54f3d876eb993b6e89d8963c7 (patch)
tree198d6691cc238fbc61a527a2169b4acbd561d39f /plugins/node
parent2d0bfcf81846ea4cb0fe2a42f3dac7f2c60e77b7 (diff)
downloadzsh-d1d06b5675bebbe54f3d876eb993b6e89d8963c7.tar.gz
zsh-d1d06b5675bebbe54f3d876eb993b6e89d8963c7.tar.bz2
zsh-d1d06b5675bebbe54f3d876eb993b6e89d8963c7.zip
Use standard open command in current plugins
Substitutes the current duplicate logic for the standard and cross-platform function open_command in plugins: frontend-search, jira, node, web-search
Diffstat (limited to 'plugins/node')
-rw-r--r--plugins/node/node.plugin.zsh10
1 files changed, 1 insertions, 9 deletions
diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh
index 39d8b10d9..2463815ac 100644
--- a/plugins/node/node.plugin.zsh
+++ b/plugins/node/node.plugin.zsh
@@ -1,13 +1,5 @@
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
function node-docs {
- # get the open command
- local open_cmd
- if [[ "$OSTYPE" = darwin* ]]; then
- open_cmd='open'
- else
- open_cmd='xdg-open'
- fi
-
- $open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
+ open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
}