mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-05 17:31:19 +01:00
53393: Complete python module arguments
Python modules can behave like commands in their own right. This allows modules to define _python_module-* functions that are used to complete module arguments. Also gets the ball rolling by defining completions for venv, http.server, and json.tool.
This commit is contained in:
parent
1818323f45
commit
f77e469ad6
5 changed files with 46 additions and 0 deletions
|
|
@ -56,6 +56,9 @@ case "$state" in
|
|||
if [[ -z "$opt_args[(I)-(c|m)]" ]]; then
|
||||
shift words
|
||||
(( CURRENT-- ))
|
||||
elif [[ -n "$opt_args[(I)-m]" ]]; then
|
||||
local ret
|
||||
_call_function ret _python_module-$opt_args[-m] && return ret
|
||||
fi
|
||||
_normal && return
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue