Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
cef6dcd9
Commit
cef6dcd9
authored
Sep 01, 2010
by
Daniel Schauenberg
Browse files
Merge branch 'pip_plugin'
parents
a8ec607a
fe09064f
Changes
2
Show whitespace changes
Inline
Side-by-side
functions/pip/_pip
0 → 100644
View file @
cef6dcd9
#compdef pip
#autoload
# pip zsh completion, based on homebrew completion
_pip_installed() {
installed_pkgs=(`pip freeze`)
}
local -a _1st_arguments
_1st_arguments=(
'bundle:Create pybundles (archives containing multiple packages)'
'freeze:Output all currently installed packages (exact versions) to stdout'
'help:Show available commands'
'install:Install packages'
'search:Search PyPI'
'uninstall:Uninstall packages'
'unzip:Unzip individual packages'
'zip:Zip individual packages'
)
local expl
local -a pkgs installed_pkgs
_arguments \
'(--version)--version[Show version number of program and exit]' \
'(-v --verbose)'{-v,--verbose}'[Give more output]' \
'(-q --quiet)'{-q,--quiet}'[Give less output]' \
'(-h --help)'{-h,--help}'[Show help]' \
'*:: :->subcmds' && return 0
if (( CURRENT == 1 )); then
_describe -t commands "pip subcommand" _1st_arguments
return
fi
case "$words[1]" in
list)
if [[ "$state" == forms ]]; then
_pip_installed
_requested installed_pkgs expl 'installed packages' compadd -a installed_pkgs
fi ;;
uninstall)
_pip_installed
_wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;;
esac
plugins/pip.plugin.zsh
0 → 100644
View file @
cef6dcd9
# add brew completion function to path
fpath
=(
$ZSH
/functions/pip
$fpath
)
autoload
-U
compinit
compinit
-i
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