config/fish/functions/pip_upgrade.fish

12 lines
343 B
Fish

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