mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-15 08:01:43 +00:00
[#23] Rename plugins to modules
This commit is contained in:
10
modules/node/functions/node-doc
Normal file
10
modules/node/functions/node-doc
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Opens the Node.js online API documentation in the default browser.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# TODO: Make the sections easier to use.
|
||||
open "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}"
|
||||
|
19
modules/node/init.zsh
Normal file
19
modules/node/init.zsh
Normal file
@ -0,0 +1,19 @@
|
||||
#
|
||||
# Completes npm.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
cache_file="${0:h}/cache.zsh"
|
||||
if [[ ! -f "$cache_file" ]]; then
|
||||
if (( $+commands[npm] )); then
|
||||
# npm is slow; cache its output.
|
||||
npm completion >! "$cache_file" 2> /dev/null
|
||||
source "$cache_file"
|
||||
fi
|
||||
else
|
||||
source "$cache_file"
|
||||
fi
|
||||
unset cache_file
|
||||
|
Reference in New Issue
Block a user