* PATCH: python versions
@ 2014-01-14 12:31 Peter Stephenson
2014-01-14 12:37 ` İsmail Dönmez
0 siblings, 1 reply; 2+ messages in thread
From: Peter Stephenson @ 2014-01-14 12:31 UTC (permalink / raw)
To: Zsh Hackers' List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: python versions
2014-01-14 12:31 PATCH: python versions Peter Stephenson
@ 2014-01-14 12:37 ` İsmail Dönmez
0 siblings, 0 replies; 2+ messages in thread
From: İsmail Dönmez @ 2014-01-14 12:37 UTC (permalink / raw)
To: Peter Stephenson; +Cc: Zsh Hackers' List
[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]
Hi,
On Tue, Jan 14, 2014 at 2:31 PM, Peter Stephenson
<p.stephenson@samsung.com>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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-14 12:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 12:31 PATCH: python versions Peter Stephenson
2014-01-14 12:37 ` İsmail Dönmez
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).