From 38a013e22cd30c0cce84caaaff2763d0c39ce131 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Thu, 24 Oct 2013 16:09:17 +0400 Subject: [PATCH] pypy: New completion identical to python (Alioth: #314501) --- completions/.gitignore | 1 + completions/Makefile.am | 3 ++- completions/python | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/completions/.gitignore b/completions/.gitignore index 0b9cd5ec..af0a0d86 100644 --- a/completions/.gitignore +++ b/completions/.gitignore @@ -134,6 +134,7 @@ pxz pydoc3 python2 python3 +pypy qemu-kvm qemu-system-i386 qemu-system-x86_64 diff --git a/completions/Makefile.am b/completions/Makefile.am index 624e5aab..bf5d792b 100644 --- a/completions/Makefile.am +++ b/completions/Makefile.am @@ -548,6 +548,7 @@ CLEANFILES = \ pvscan \ pxz \ pydoc3 \ + pypy \ python2 \ python3 \ qemu-kvm \ @@ -845,7 +846,7 @@ symlinks: $(targetdir) $(DATA) rm -f $(targetdir)/$$file && \ $(LN_S) pydoc $(targetdir)/$$file ; \ done - for file in python2 python3 ; do \ + for file in pypy python2 python3 ; do \ rm -f $(targetdir)/$$file && \ $(LN_S) python $(targetdir)/$$file ; \ done diff --git a/completions/python b/completions/python index 5c5e7888..8736de5b 100644 --- a/completions/python +++ b/completions/python @@ -28,7 +28,7 @@ _python() -- "$cur" ) ) return 0 ;; - !(?(*/)python*([0-9.])|-?)) + !(?(*/)python*([0-9.])|?(*/)pypy*([0-9.])|-?)) [[ $cword -lt 2 || ${words[cword-2]} != -[QW] ]] && _filedir ;; esac @@ -51,6 +51,6 @@ _python() return 0 } && -complete -F _python python python2 python3 +complete -F _python python python2 python3 pypy # ex: ts=4 sw=4 et filetype=sh