Skip to content

Commit

Permalink
[Fix sorin-ionescu#635] Use $BROWSER to open node documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sorin-ionescu committed Oct 6, 2014
1 parent 62198b0 commit c4b50ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/node/functions/node-doc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Sorin Ionescu <[email protected]>
#

if [[ -z "$BROWSER" ]]; then
print "$0: no web browser defined" >&2
return 1
fi

# TODO: Make the sections easier to use.
open "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}"
"$BROWSER" "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}"

0 comments on commit c4b50ec

Please sign in to comment.