rehash when installed module matches the requested module
rehash when installed module matches the requested module

postinstall and postuninstall hooks are invoked for every single module
installed, which includes dependencies. We don't need to rehash after
*every* package, only the top-level one.

$npm_package_name is the name of the just-installed package.
$npm_config_argv are the arguments to the invoked npm command

only rehash when the installed package name matches the invoked command.
(this is a huge hack, but it's a close heuristic to knowing when the
postinstall script was executed for a top-level package. npm really
ought to be passing in some useful args.)

nodenv/nodenv-package-rehash,jasonkarns/nodenv-package-rehash