mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
add conditions to open module specific node documentation
This commit is contained in:
parent
0ee89d965e
commit
d3939a5f7d
1 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Open the node api for your current version to the optional section.
|
||||
# TODO: Make the section part easier to use.
|
||||
function node-docs {
|
||||
open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
|
||||
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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue