From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22357 invoked by alias); 14 Jan 2014 12:31:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32255 Received: (qmail 27195 invoked from network); 14 Jan 2014 12:31:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc96d000004885-6c-52d52e26ea0d Date: Tue, 14 Jan 2014 12:31:33 +0000 From: Peter Stephenson To: Zsh Hackers' List Subject: PATCH: python versions Message-id: <20140114123133.1b8e958c@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEJMWRmVeSWpSXmKPExsVy+t/xy7pqeleDDJ72SlscbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujLMLZjMVzGWv6Nu+hb2B8R9rFyMnh4SAicSnXSeZIWwxiQv3 1rOB2EICSxklVq8UgrCXM0l0TVIHsVkEVCV6ty0Eq2cTMJSYumk2YxcjB4eIgLZE+0cxkLCw gLxEw4F+RhCbV8Be4uynBWDl/AL6Elf/fmKCWGUvMfPKGagaQYkfk++xgNjMAloSm7c1sULY 8hKb17xlnsDINwtJ2SwkZbOQlC1gZF7FKJpamlxQnJSea6RXnJhbXJqXrpecn7uJERJOX3cw Lj1mdYhRgINRiYf3BOOVICHWxLLiytxDjBIczEoivE8krwYJ8aYkVlalFuXHF5XmpBYfYmTi 4JRqYNxR3rzx6lEdzetec0+aJf+xiPhdeHv/4v2eoY+mfpA6vaOm6eFu2TWG57c18mzLE/IM uGLts97xQMLRwPTKTcxyHGf2bt9RyyG/xzJhMrfPVoF9TkVqGyRyqk+qnft89+tTjb6fW5kO BihPyVvoo9XsF5q7s++Uo/iXa387c9XWikX1Xjx2X06JpTgj0VCLuag4EQBY3AGwBQIAAA== 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