diff --git a/fish/functions/pip_upgrade.fish b/fish/functions/pip_upgrade.fish new file mode 100644 index 0000000..4165f86 --- /dev/null +++ b/fish/functions/pip_upgrade.fish @@ -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