fish: add pip upgrade script
This commit is contained in:
parent
6ac76c8d50
commit
adc48c926a
11
fish/functions/pip_upgrade.fish
Normal file
11
fish/functions/pip_upgrade.fish
Normal 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
|
Loading…
x
Reference in New Issue
Block a user