diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh index e53fdc582..e2f18a032 100644 --- a/plugins/node/node.plugin.zsh +++ b/plugins/node/node.plugin.zsh @@ -1,9 +1,6 @@ # Open the node api for your current version to the optional section. # TODO: Make the section part easier to use. function node-docs { - if [ $# -eq 0 ]; then - open_command "http://nodejs.org/docs/$(node --version)/api/all.html" - else - open_command "http://nodejs.org/docs/$(node --version)/api/$1.html" - fi + local section=${1:-all} + open_command "http://nodejs.org/docs/$(node --version)/api/$section.html" }