mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
15 lines
No EOL
300 B
Bash
15 lines
No EOL
300 B
Bash
# 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
|
|
} |