fish: add pip upgrade script

This commit is contained in:
Charles Gould 2020-02-23 23:01:29 -05:00
parent 6ac76c8d50
commit adc48c926a

View File

@ -0,0 +1,11 @@
function pip3_upgrade --description "Upgrade python packages (pip3)"
set --local py_pkgs_outdated (pip3 list --outdated | awk 'NR > 2 {print $1}')
if test (count $py_pkgs_outdated) = 0
echo "All packages up-to-date."
else
for py_pkg in $py_pkgs_outdated
pip3 install $py_pkg -U
end
end
end