Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
2acb3071
Unverified
Commit
2acb3071
authored
Dec 29, 2021
by
WH-2099
Committed by
GitHub
Dec 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(pip): don't overwrite `requirements.txt` in internal commands (#10061)
parent
eec34b32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
pip.plugin.zsh
plugins/pip/pip.plugin.zsh
+14
-4
No files found.
plugins/pip/pip.plugin.zsh
View file @
2acb3071
...
...
@@ -91,11 +91,21 @@ fi
# Create requirements file
alias
pipreq
=
"pip freeze > requirements.txt"
# Update all installed packages
alias
pipupall
=
"pipreq && sed -i 's/==/>=/g' requirements.txt && pip install -r requirements.txt --upgrade && rm -rf requirements.txt"
# Install packages from requirements file
alias
pipir
=
"pip install -r requirements.txt"
# Update all installed packages
function
pipupall
{
# non-GNU xargs does not support nor need `--no-run-if-empty`
local
xargs
=
"xargs --no-run-if-empty"
xargs
--version
2>/dev/null |
grep
-q
GNU
||
xargs
=
"xargs"
pip list
--outdated
--format
freeze |
cut
-d
=
-f1
|
${
=xargs
}
pip
install
--upgrade
}
# Uninstalled all installed packages
alias
pipunall
=
"pipreq && pip uninstall -r requirements.txt -y && rm -rf requirements.txt"
function
pipunall
{
# non-GNU xargs does not support nor need `--no-run-if-empty`
local
xargs
=
"xargs --no-run-if-empty"
xargs
--version
2>/dev/null |
grep
-q
GNU
||
xargs
=
"xargs"
pip list
--format
freeze |
cut
-d
=
-f1
|
${
=xargs
}
pip uninstall
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment