summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_python
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_python')
-rw-r--r--Completion/Unix/Command/_python33
1 files changed, 22 insertions, 11 deletions
diff --git a/Completion/Unix/Command/_python b/Completion/Unix/Command/_python
index edc49b72b..da84b30b5 100644
--- a/Completion/Unix/Command/_python
+++ b/Completion/Unix/Command/_python
@@ -24,12 +24,12 @@ fi
_arguments -C -s -S "$args[@]" \
"-B[don't write .py\[co\] files on import]" \
- '(1 -)-c+[program passed in as string (terminates option list)]:python command:' \
+ '(-)-c+[program passed in as string (terminates option list)]:python command:' \
'-d[debug output from parser]' \
'-E[ignore PYTHON* environment variables (such as PYTHONPATH)]' \
'(1 * -)-h[display help information]' \
'-i[inspect interactively after running script]' \
- '(1 * -)-m[run library module as a script (terminates option list)]:module:->modules' \
+ '(-)-m[run library module as a script (terminates option list)]:module:->modules' \
'-O[optimize generated bytecode slightly]' \
'-OO[remove doc-strings in addition to the -O optimizations]' \
"-s[don't add user site directory to sys.path]" \
@@ -39,16 +39,27 @@ _arguments -C -s -S "$args[@]" \
'(1 * -)-V[display version information]' \
'-W+[warning control]:warning filter (action\:message\:category\:module\:lineno):(default always ignore module once error)' \
'-x[skip first line of source, allowing use of non-Unix forms of #!cmd]' \
- '(-)1:script file:_files -g "*.py(|c|o)(-.)"' \
+ '(-)1:script_or_arg:->script_or_arg' \
'*::script argument: _normal' && return
-if [[ "$state" = modules ]]; then