From d1d06b5675bebbe54f3d876eb993b6e89d8963c7 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 5 Aug 2015 00:32:57 +0200 Subject: 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 --- plugins/node/node.plugin.zsh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'plugins/node') 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" } -- cgit v1.2.3-70-g09d2