Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: python versions
- X-seq: zsh-workers 32256
- From: İsmail Dönmez <ismail@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: PATCH: python versions
- Date: Tue, 14 Jan 2014 14:37:34 +0200
- Cc: "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=donmez.ws; s=www; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=jcv99lRDQKzNp4vgL1emduQqZDohl01Uw2lvb5ySReg=; b=RE6JasY0wVMaR4rvi7pp9FHH4eSidz6mTcyjlk2USkb+BYLDCzbWHgg1k/OCWKFpgm 1KXxxWVyLf0CNswhJQDIBAa2n+1t51Rx7urLFRUf+xMpajU/PSs1hkhRZL3oqRsyPJQ3 4soq3T/I/3syJG7rMzJ0Zx+EDiTTPfVa4oKj8=
- In-reply-to: <20140114123133.1b8e958c@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20140114123133.1b8e958c@pwslap01u.europe.root.pri>
Hi,
On Tue, Jan 14, 2014 at 2:31 PM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx>wrote:
> 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
>
You should also add python{3.1 ,3.2,3.3,3.4} well at least 3.3 and 3.4
Messages sorted by:
Reverse Date,
Date,
Thread,
Author