[arch-commits] Commit in bash-completion/trunk (PKGBUILD python.patch)

Eric Bélanger eric at archlinux.org
Sat Jan 29 04:51:50 UTC 2011


    Date: Friday, January 28, 2011 @ 23:51:50
  Author: eric
Revision: 108035

upgpkg: bash-completion 1.2-3
Fixed/updated python completion (close FS#20257)

Added:
  bash-completion/trunk/python.patch
Modified:
  bash-completion/trunk/PKGBUILD

--------------+
 PKGBUILD     |   11 +++++-----
 python.patch |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-01-29 02:38:32 UTC (rev 108034)
+++ PKGBUILD	2011-01-29 04:51:50 UTC (rev 108035)
@@ -3,20 +3,21 @@
 
 pkgname=bash-completion
 pkgver=1.2
-pkgrel=2
+pkgrel=3
 pkgdesc="Programmable completion for the bash shell"
 arch=('any')
 url="http://bash-completion.alioth.debian.org/"
 license=('GPL')
 depends=('bash')
-source=(http://bash-completion.alioth.debian.org/files/$pkgname-$pkgver.tar.bz2)
-md5sums=('88c022a98a02a02293716f840eadd884')
-sha1sums=('47e6fb919ae227e74172870379b0fe999a2ae70d')
+source=(http://bash-completion.alioth.debian.org/files/$pkgname-$pkgver.tar.bz2 python.patch)
+md5sums=('88c022a98a02a02293716f840eadd884' '4657ba3d32f6f38765327fc640e5113d')
+sha1sums=('47e6fb919ae227e74172870379b0fe999a2ae70d' 'b6acd3317558615bf2949694f9c4d17e95eb0d07')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
+  patch -p0 < ../python.patch
 
-  # fixes for archlinux
+# fixes for archlinux
   sed -i 's#/sbin" lsmod#/bin" lsmod#' bash_completion
 
   ./configure --prefix=/usr --sysconfdir=/etc

Added: python.patch
===================================================================
--- python.patch	                        (rev 0)
+++ python.patch	2011-01-29 04:51:50 UTC (rev 108035)
@@ -0,0 +1,62 @@
+--- contrib/python.orig	2010-06-13 06:21:19.000000000 -0400
++++ contrib/python	2011-01-28 23:16:27.000000000 -0500
+@@ -9,22 +9,22 @@
+     _get_comp_words_by_ref cur prev
+ 
+     case $prev in
+-    -Q)
+-        COMPREPLY=( $( compgen -W "old new warn warnall" -- "$cur" ) )
+-        return 0
+-        ;;
+-    -W)
+-        COMPREPLY=( $( compgen -W "ignore default all module once error" \
+-            -- "$cur" ) )
+-        return 0
+-        ;;
+-    -c)
+-        _filedir '@(py|pyc|pyo)'
+-        return 0
+-        ;;
+-    !(python|-?))
+-        [[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir
+-        ;;
++        -'?'|-h|--help|-V|--version|-c|-m)
++            return 0
++            ;;
++        -Q)
++            COMPREPLY=( $( compgen -W "old new warn warnall" -- "$cur" ) )
++            return 0
++            ;;
++        -W)
++            COMPREPLY=( $( compgen -W "ignore default all module once error" \
++                -- "$cur" ) )
++            return 0
++            ;;
++        !(?(*/)python*([0-9.])|-?))
++            [[ $COMP_CWORD -lt 2 || ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] \
++                && _filedir
++            ;;
+     esac
+ 
+ 
+@@ -37,17 +37,14 @@
+ 
+ 
+     if [[ "$cur" != -* ]]; then
+-        _filedir '@(py|pyc|pyo)'
++        _filedir 'py?([co])'
+     else
+-        COMPREPLY=( $( compgen -W "- -d -E -h -i -O -Q -S -t -u \
+-            -U -v -V -W -x -c" -- "$cur" ) )
++        COMPREPLY=( $( compgen -W "$( _parse_help $1 -h )" -- "$cur" ) )
+     fi
+ 
+-
+-
+     return 0
+ } &&
+-complete -F _python -o filenames python
++complete -F _python python python2 python3
+ 
+ # Local variables:
+ # mode: shell-script




More information about the arch-commits mailing list