about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoug Kearns <dkearns@users.sourceforge.net>2003-03-13 03:48:49 +0000
committerDoug Kearns <dkearns@users.sourceforge.net>2003-03-13 03:48:49 +0000
commit5ba6538fb3146f1ce00c4970a8fb0e6830bf6de4 (patch)
tree671bff6262671ac8127d1f3952b33e1bc101affa
parent1c9ac56c43527819d80bc15a53460802cd7c84cd (diff)
downloadzsh-5ba6538fb3146f1ce00c4970a8fb0e6830bf6de4.tar.gz
zsh-5ba6538fb3146f1ce00c4970a8fb0e6830bf6de4.tar.xz
zsh-5ba6538fb3146f1ce00c4970a8fb0e6830bf6de4.zip
18305: new completion for python
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/.distfiles2
-rw-r--r--Completion/Unix/Command/_python26
3 files changed, 32 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b9d82254a..6a877e3e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
 	* 18325: Src/Modules/parameter.c: options on by default weren't
 	handled correctly.
 
+2003-02-27  Doug Kearns  <djkea2@mugca.its.monash.edu.au>
+
+	* 18305: Completion/Unix/Command/_python: new completion for
+	python.
+
 2003-02-26  Clint Adams  <clint@zsh.org>
 
         * 18303: zshconfig.ac: fix some always-true test evaluations.
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index 64ccaf7b7..464483893 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -18,5 +18,5 @@ _loadkeys     _apm          _ruby         _samba        _sysctl       _links
 _user_admin   _rsync        _arping	  _spamassassin _mtools	      _fsh
 _chkconfig    _cdcd         _irssi	  _sccs         _texinfo      _ant
 _global       _global_tags  _figlet       _ifconfig     _last         _larch
-_lsof         _mt           _xmlsoft      _elinks       _tidy
+_lsof         _mt           _xmlsoft      _elinks       _tidy         _python
 '
diff --git a/Completion/Unix/Command/_python b/Completion/Unix/Command/_python
new file mode 100644
index 000000000..08d2f3887
--- /dev/null
+++ b/Completion/Unix/Command/_python
@@ -0,0 +1,26 @@
+#compdef python
+
+# Python 2.2.2
+
+_arguments -s -S \
+  '(1 -)-c+[program passed in as string (terminates option list)]:python command:' \
+  '-d[debug output from parser (also PYTHONDEBUG=x)]' \
+  '-E[ignore environment variables (such as PYTHONPATH)]' \
+  '(1 * -)-h[print this help message and exit]' \
+  '-i[inspect interactively after running script (also PYTHONINSPECT=x)]' \
+  '-O[optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)]' \
+  '-OO[remove doc-strings in addition to the -O optimizations]' \
+  '-Q+[division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew]:division option:(old warn warnall new)' \
+  "-S[don't imply 'import site' on initialization]" \
+  '-t[issue warnings about inconsistent tab usage]' \
+  '-tt[issue errors about inconsistent tab usage]' \
+  '-u[unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)]' \
+  '-v[verbose (trace import statements) (also PYTHONVERBOSE=x)]' \
+  '(1 * -)-V[print the Python version number and exit]' \
+  '-W+[warning control (arg is action:message:category:module:lineno)]:warning filter:(default always ignore module once error)' \
+  '-x[skip first line of source, allowing use of non-Unix forms of #!cmd]' \
+  '(1 -)-[program read from stdin (default; interactive mode if a tty)]' \
+  '(-)1:script file:_files -g \*.py\(\|c\|o\)' \
+  '*:script argument:_files' && return
+
+return 1