Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: python versions



I sometimes need to pick particular older versions of Python because of
the associated libraries, or conversely to try out scripts with
different versions of Python.  The change is mostly motivated by wanting
to get _normal completion for the script argument.

Obviously this is a moving target, but then that's true of all
completion for external commands.  Presumably this is a fairly special
requirement and not worth worrying too much about.  It would be possible
to use compdef -k but then the patterns get checked every time you do a
completion which seems overkill.

diff --git a/Completion/Unix/Command/_python b/Completion/Unix/Command/_python
index ca1ed37..98c4021 100644
--- a/Completion/Unix/Command/_python
+++ b/Completion/Unix/Command/_python
@@ -1,4 +1,4 @@
-#compdef python
+#compdef python python2 python2.4 python2.5 python2.6 python2.7 python3.0
 
 # Python 2.6
 # Python 3.0

pws



Messages sorted by: Reverse Date, Date, Thread, Author