mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
node plugin: simplify URL computation
This commit is contained in:
parent
d3939a5f7d
commit
a7643c554c
1 changed files with 2 additions and 5 deletions
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue