[Bash-completion-commits] [SCM] bash-completion branch, master, updated. c1d3cdad70523552e63688cb053a960b64e97b16

Ville Skyttä ville.skytta at iki.fi
Sun Nov 21 18:38:02 UTC 2010


The following commit has been merged in the master branch:
commit d1be965eeed3d865f8b54c1ebe8fe9c8398192de
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Nov 21 20:02:12 2010 +0200

    Install python completion for python2 and python3 too.

diff --git a/CHANGES b/CHANGES
index 66ec729..50d7256 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 449bcef..ad27270 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

-- 
bash-completion



More information about the Bash-completion-commits mailing list