zsh-workers
 help / color / mirror / code / Atom feed
98c4021bf5ca08a19a7df3cb974da78244a2628b blob 2132 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
#compdef python python2 python2.4 python2.5 python2.6 python2.7 python3.0

# Python 2.6
# Python 3.0

local curcontext="$curcontext" state line expl
typeset -A opt_args

local -a args

if _pick_variant python3=Python\ 3 python2 --version; then
  args=(
    '(-bb)-b[issue warnings about str(bytes_instance), str(bytearray_instance) and comparing bytes/bytearray with str]'
    '(-b)-bb[issue errors about str(bytes_instance), str(bytearray_instance) and comparing bytes/bytearray with str]'
  )
else
  args=(
    '-Q+[division options]:division option:(old warn warnall new)'
    '(-tt)-t[issue warnings about inconsistent tab usage]'
    '(-t)-tt[issue errors about inconsistent tab usage]'
    '-3[warn about Python 3.x incompatibilities]'
  )
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:' \
  '-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' \
  '-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]" \
  "-S[don't imply 'import site' on initialization]" \
  '-u[unbuffered binary stdout and stderr]' \
  '-v[verbose (trace import statements)]' \
  '(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)(-.)"' \
  '*::script argument: _normal' && return

if [[ "$state" = modules ]]; then
  local -a modules
  modules=(
    ${${=${(f)"$(_call_program modules $words[1] -c \
      'from\ pydoc\ import\ help\;\ help\(\"modules\"\)')"}[2,-3]}:#\(package\)}
  )
  _wanted modules expl module compadd -a modules && return
fi

return 1
debug log:

solving 98c4021 ...
found 98c4021 in https://inbox.vuxu.org/zsh-workers/20140114123133.1b8e958c@pwslap01u.europe.root.pri/
found ca1ed37 in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 ca1ed37fd10a9e3d69fcc3d3bf1a360a4b41fc54	Completion/Unix/Command/_python

applying [1/1] https://inbox.vuxu.org/zsh-workers/20140114123133.1b8e958c@pwslap01u.europe.root.pri/
diff --git a/Completion/Unix/Command/_python b/Completion/Unix/Command/_python
index ca1ed37..98c4021 100644

Checking patch Completion/Unix/Command/_python...
Applied patch Completion/Unix/Command/_python cleanly.

index at:
100644 98c4021bf5ca08a19a7df3cb974da78244a2628b	Completion/Unix/Command/_python

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).