Format pip.plugin.bash to match the project's coding style.
parent
38fc1a0bdc
commit
04f78462a5
|
|
@ -3,8 +3,7 @@ about-plugin 'pip upgrade/uninstall all packages'
|
||||||
|
|
||||||
pip-upgrade-all() {
|
pip-upgrade-all() {
|
||||||
local outdated_packages="$(pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1)"
|
local outdated_packages="$(pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1)"
|
||||||
if [ -z $outdated_packages ]
|
if [ -z $outdated_packages ]; then
|
||||||
then
|
|
||||||
echo "pip: everything is up to date."
|
echo "pip: everything is up to date."
|
||||||
else
|
else
|
||||||
for package in $outdated_packages; do
|
for package in $outdated_packages; do
|
||||||
|
|
@ -12,10 +11,10 @@ pip-upgrade-all() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pip-uninstall-all() {
|
pip-uninstall-all() {
|
||||||
local installed_packages=pip list --user --format=freeze | grep -v '^\-e' | cut -d = -f 1
|
local installed_packages="$(pip list --user --format=freeze | grep -v '^\-e' | cut -d = -f 1)"
|
||||||
if [ -z $installed_packages ]
|
if [ -z $installed_packages ]; then
|
||||||
then
|
|
||||||
echo "pip: nothing has been installed."
|
echo "pip: nothing has been installed."
|
||||||
else
|
else
|
||||||
for package in $installed_packages; do
|
for package in $installed_packages; do
|
||||||
|
|
@ -23,4 +22,3 @@ pip-uninstall-all() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue