Merge pull request #4217 from mcornella/standard-open-command
Implement and use a standard, cross-platform open commandmaster
commit
b8dbd9bfba
7 changed files with 26 additions and 43 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