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
This commit is contained in:
Marc Cornellà
2015-08-05 00:32:57 +02:00
parent 2d0bfcf818
commit d1d06b5675
4 changed files with 7 additions and 40 deletions

View File

@ -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"
}