@ -7,7 +7,7 @@ _npm_run_completion() {
break
fi
done
if [ ! "$dir" = "" ]; then
if [ ! "$dir" = "" ] && type node > /dev/null; then
local options=("${(@f)$(node -e "var pkg = require('$dir/$filename'); pkg.scripts && Object.keys(pkg.scripts).forEach(function(script) { console.log(script.replace(':', '\\\:')+':$ '+pkg.scripts[script]) })")}")
_describe 'values' options