node.plugin.zsh 353 B

12345678910111213
  1. # Open the node api for your current version to the optional section.
  2. # TODO: Make the section part easier to use.
  3. function node-docs {
  4. # get the open command
  5. local open_cmd
  6. if [[ $(uname -s) == 'Darwin' ]]; then
  7. open_cmd='open'
  8. else
  9. open_cmd='xdg-open'
  10. fi
  11. $open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
  12. }