Substitutes the current duplicate logic for the standard and cross-platform function open_command in plugins: frontend-search, jira, node, web-searchmaster
parent
2d0bfcf818
commit
d1d06b5675
4 changed files with 7 additions and 40 deletions
@ -1,13 +1,5 @@ |
|||||||
# Open the node api for your current version to the optional section. |
# Open the node api for your current version to the optional section. |
||||||
# TODO: Make the section part easier to use. |
# TODO: Make the section part easier to use. |
||||||
function node-docs { |
function node-docs { |
||||||
# get the open command |
open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1" |
||||||
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" |
|
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue