From d1be965eeed3d865f8b54c1ebe8fe9c8398192de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 21 Nov 2010 20:02:12 +0200 Subject: [PATCH] Install python completion for python2 and python3 too. --- CHANGES | 4 ++-- completions/python | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 66ec7290..50d72564 100644 --- a/CHANGES +++ b/CHANGES @@ -15,8 +15,8 @@ bash-completion (2.x) *.awb, and *.iso (Alioth: #311420) to mplayer filename completions. * Add "short" tarball extensions to unxz, unlzma etc completions. * Improve /etc/init.d/*, ipmitool, jar, javadoc, man, mencoder, mkdir, - mplayer, povray, rpmbuild, sqlite3, tar, wodim, and general help parsing - completions. + mplayer, povray, python, rpmbuild, sqlite3, tar, wodim, and general help + parsing completions. * Fix p4 and povray completions (Alioth: #312625). * Add *.xsd, *.xsl, *.rng, and *.wsdl to xmllint filename completions. * Recognize rpm query mode based on the --file, --group, --package, and diff --git a/completions/python b/completions/python index 449bceff..ad272707 100644 --- a/completions/python +++ b/completions/python @@ -22,7 +22,7 @@ _python() _filedir '@(py|pyc|pyo)' return 0 ;; - !(python|-?)) + !(python?([23])|-?)) [[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir ;; esac @@ -45,7 +45,7 @@ _python() return 0 } && -complete -F _python python +complete -F _python python python2 python3 # Local variables: # mode: shell-script