This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash completion for Yeoman generators - tested in Ubuntu, OS X and Windows (using Git bash) | |
function _yo_generator_complete_() { | |
# local node_modules if present | |
local local_modules=$(if [ -d node_modules ]; then echo "node_modules:"; fi) | |
# node_modules in /usr/local/lib if present | |
local usr_local_modules=$(if [ -d /usr/local/lib/node_modules ]; then echo "/usr/local/lib/node_modules:"; fi) | |
# node_modules in user's Roaming/npm (Windows) if present | |
local win_roam_modules=$(if [ -d $(which yo)/../node_modules ]; then echo "$(which yo)/../node_modules:"; fi) | |
# also, node_modules in nodebrew current | |
local nodebrew_modules=$(if [ -d ${HOME}/.nodebrew/current/lib/node_modules ]; then echo "${HOME}/.nodebrew/current/lib/node_modules:"; fi) |
NewerOlder