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
1c4997f5
Commit
1c4997f5
authored
Dec 07, 2011
by
Max Persson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added caching of packages
parent
42b01234
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
_pip
plugins/pip/_pip
+5
-2
No files found.
plugins/pip/_pip
View file @
1c4997f5
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
# pip zsh completion, based on homebrew completion
# pip zsh completion, based on homebrew completion
_pip_all() {
_pip_all() {
all_pkgs=(`pip search * | cut -d ' ' -f 1 | tr '[A-Z]' '[a-z]'`)
# we cache the list of packages (originally from the macports plugin)
if (( ! $+piplist )); then
piplist=($(pip search * | cut -d ' ' -f 1 | tr '[A-Z]' '[a-z]'))
fi
}
}
_pip_installed() {
_pip_installed() {
...
@@ -62,7 +65,7 @@ case "$words[1]" in
...
@@ -62,7 +65,7 @@ case "$words[1]" in
if [[ "$state" == packages ]]; then
if [[ "$state" == packages ]]; then
_pip_all
_pip_all
_wanted
all_pkgs expl 'packages' compadd -a all_pkgs
_wanted
piplist expl 'packages' compadd -a piplist
fi ;;
fi ;;
uninstall)
uninstall)
_pip_installed
_pip_installed
...
...
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