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 authored and Ben Kutil committed Oct 31, 2014
1 parent ab8b0ff commit 5d9b432
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 5d9b432

Please sign in to comment.