uses the ./jq parser to show node specific info

This commit is contained in:
Rocky Assad 2017-05-10 13:04:40 -05:00
commit b083ef832f
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,15 @@
# package-version.plugin.zsh
# Shows the version of the package.json file in current directory
package_version() {
if [[ -f ./package.json ]]
then
echo "v$(jq -r .version package.json)"
else
echo "no package.json file found"
fi
}
# shorts
pv() {
package_version
}