[arch-commits] CVS update of extra/system/bash-completion (6 files)

Dan McGee dan at archlinux.org
Thu Jan 10 04:10:36 UTC 2008


    Date: Wednesday, January 9, 2008 @ 23:10:36
  Author: dan
    Path: /home/cvs-extra/extra/system/bash-completion

   Added: completion_updates.patch (1.1)
Modified: PKGBUILD (1.40 -> 1.41)
 Removed: archlinux (1.4) archlinux_fixes.patch (1.2)
          readonly_vars.patch (1.1) xine.extra (1.1)

upgpkg: bash-completion 20060301-9
    remove unneeded archlinux completion, consolidate patches


--------------------------+
 PKGBUILD                 |   25 +--
 archlinux                |  347 ---------------------------------------------
 archlinux_fixes.patch    |   21 --
 completion_updates.patch |   60 +++++++
 readonly_vars.patch      |   24 ---
 xine.extra               |    4 
 6 files changed, 70 insertions(+), 411 deletions(-)


Index: extra/system/bash-completion/PKGBUILD
diff -u extra/system/bash-completion/PKGBUILD:1.40 extra/system/bash-completion/PKGBUILD:1.41
--- extra/system/bash-completion/PKGBUILD:1.40	Thu Nov 29 01:59:35 2007
+++ extra/system/bash-completion/PKGBUILD	Wed Jan  9 23:10:35 2008
@@ -1,37 +1,32 @@
-# $Id: PKGBUILD,v 1.40 2007/11/29 06:59:35 jeff Exp $
-# Maintainer: aurelien <aurelien at archlinux.org>
+# $Id: PKGBUILD,v 1.41 2008/01/10 04:10:35 dan Exp $
 # Contributor: Aurelien Foret <orelien at chez.com>
-# ArchLinux support script: Manolis Tzanidakis <mtzanidakis at freemail.gr>
 
 pkgname=bash-completion
 pkgver=20060301
-pkgrel=8
+pkgrel=9
 pkgdesc="Programmable completion indefinitely extends the type of completion built in bash"
 arch=(i686 x86_64)
 url='http://www.caliban.org/bash/'
 license=('GPL')
 depends=('bash')
-source=(http://www.caliban.org/files/bash/$pkgname-$pkgver.tar.gz bash_completion.sh archlinux\
-        archlinux_fixes.patch xine.extra readonly_vars.patch)
+source=(http://www.caliban.org/files/bash/$pkgname-$pkgver.tar.gz
+        bash_completion.sh completion_updates.patch)
 md5sums=('9bca1cf97e8f8c73e3ef560cc9dead21'
          'f7386d73b862ae1dd04afb4f1fa1dd3a'
-         '66f615893de8cdd6b79712432311279e'
-         '3b25ed10950e10a60f3696cdecec9ef1'
-         '0f11e49170b37deeb0848b7a337d05b3'
-         '00bfa3fd00e8ea0d8a22cbb75dd43f12')
+         'e1b6eabe924da0b211b11ef63a373725')
 
 build()
 {
   cd $startdir/src/bash_completion
-  patch -up1 -i ../archlinux_fixes.patch
-  patch -Np0 -i ../readonly_vars.patch
+  patch -Np0 -i ../completion_updates.patch
   install -D -m755 bash_completion $startdir/pkg/etc/bash_completion
   install -D -m755 ../bash_completion.sh $startdir/pkg/etc/profile.d/bash_completion.sh
+
   mkdir -p $startdir/pkg/etc/bash_completion.d
+  install -m644 contrib/* $startdir/pkg/etc/bash_completion.d
 
-# Mercurial provides it's updated completion for itself
-  rm $startdir/src/bash_completion/contrib/hg
+  # Mercurial provides it's updated completion for itself
+  rm $startdir/pkg/etc/bash_completion.d/hg
 
-  install -m644 {contrib/*,../archlinux} $startdir/pkg/etc/bash_completion.d
 }
 
Index: extra/system/bash-completion/archlinux
diff -u extra/system/bash-completion/archlinux:1.4 extra/system/bash-completion/archlinux:removed
--- extra/system/bash-completion/archlinux:1.4	Mon Mar 27 02:34:43 2006
+++ extra/system/bash-completion/archlinux	Wed Jan  9 23:10:36 2008
@@ -1,347 +0,0 @@
-# vim: set ft=sh:
-# Bash completion for ArchLinux
-#
-# v.1.1 Manolis Tzanidakis <mtzanidakis at freemail.gr>
-#
-# Distributed under the terms of the GNU General Public License, v2 or later.
-#
-
-## Changelog ####################################################
-#                                                               #
-# * 1.1 (20040117)                                              #
-#   - Code cleanup                                              #
-#   - Updated to pacman 2.7.2-2                                 #
-# * 20040216 (orelien)                                          #
-#   - Improved available_{pkgs,groups) functions                #
-#   - Added support for querying groups                         #
-#                                                               #
-#################################################################
-
-## initial functions
-#
-
-rem_selected ()
-{
-  # (Adapted from bash_completion by Ian Macdonald <ian at caliban.org>)
-  # This removes any options from the list of completions that have
-  # already been specified on the command line.
-  COMPREPLY=($(echo "${COMP_WORDS[@]}" | \
-    (while read -d ' ' i; do
-      [ "${i}" == "" ] && continue
-      # flatten array with spaces on either side,
-      # otherwise we cannot grep on word boundaries of
-      # first and last word
-      COMPREPLY=" ${COMPREPLY[@]} "
-      # remove word from list of completions
-      COMPREPLY=(${COMPREPLY/ ${i%% *} / })
-    done
-  echo ${COMPREPLY[@]})))
-  return 0
-}
-
-_available_repos ()
-{
-  COMPREPLY=( $( compgen -W "$(grep '\[' /etc/pacman.conf | grep -v -e 'options' -e '^#' | tr -d '[]' )" -- $cur ) )
-}
-
-_installed_pkgs ()
-{
-  local installed_pkgs
-  installed_pkgs=$( ls /var/lib/pacman/local/ )
-  COMPREPLY=( $( compgen -W "$( for i in $installed_pkgs; do echo ${i%-*-*}; done )" -- $cur ) )
-}
-
-_available_pkgs ()
-{
-  #find balks easilly on a find /foo/*/* type dir, especially one like
-  #   /var/lib/pacman/*/*
-  # This little change-up removes the find *and* only uses enabled repos
-  local available_pkgs
-  local enabled_repos
-  enabled_repos=$( grep '\[' /etc/pacman.conf | grep -v -e 'options' -e '^#' | tr -d '[]' )
-  available_pkgs=$( for r in $enabled_repos; do echo /var/lib/pacman/$r/*; done )
-  COMPREPLY=( $( compgen -W "$( for i in $available_pkgs; do j=${i##*/}; echo ${j%-*-*}; done )" -- $cur ) )
-}
-
-_installed_groups ()
-{
-  local installed_groups
-  installed_groups=$( find /var/lib/pacman/local -name desc -exec sed -ne '/%GROUPS%/,/^$/{//d; p}' {} \; | sort -u )
-  COMPREPLY=( $( compgen -W "$( for i in $installed_groups; do echo ${i%-*-*}; done )" -- $cur ) )
-}
-
-_available_groups ()
-{
-  #find balks easilly on a find /foo/*/* type dir, especially one like
-  #   /var/lib/pacman/*/*
-  # This little change-up removes the find *and* only uses enabled repos
-  local available_groups
-  local enabled_repos
-  enabled_repos=$( grep '\[' /etc/pacman.conf | grep -v -e 'options' -e '^#' | tr -d '[]' )
-  available_groups=$( for r in $enabled_repos; do sed '/%GROUPS%/,/^$/{//d; p}' /var/lib/pacman/$r/*/desc | sort -u; done )
-  COMPREPLY=( $( compgen -W "$( for i in $available_groups; do echo ${i%-*-*}; done )" -- $cur ) )
-}
-
-## init (/etc/rc.d) script completion (quick 'n' dirty ;-)
-#
-
-complete -W "start stop restart" \
-  $(for i in /etc/rc.d/*; do echo ${i##*/}; done)
-
-## makepkg completion
-#
-
-_makepkg ()
-{
-  local cur prev
-  COMPREPLY=()
-  cur=${COMP_WORDS[COMP_CWORD]}
-  prev=${COMP_WORDS[COMP_CWORD-1]}
-
-  case "$prev" in
-    -@(p|w))
-      _filedir
-      return 0
-    ;;
-    --help|--cleancache|--genmd5)
-      COMPREPLY=''
-      return 0
-    ;;
-  esac
-
-  if [[ "$cur" == -* ]]; then
-    COMPREPLY=( $( compgen -W '-b --builddeps \
-      -c --clean \
-      -C --cleancache \
-      -d --nodeps \
-      -f --force \
-      -g --genmd5 \
-      -h --help \
-      -i --install \
-      -m --nocolor \
-      -n --nostrip \
-      -r --rmdeps \
-      -s --syncdeps \
-      -p -w' -- $cur ) )
-  fi
-
-  rem_selected
-}
-complete -o default -F _makepkg makepkg
-
-## pacman completion
-#
-
-_instring ()
-{
-    str="${1}"
-    shift 1
-    for c in "${@}"; do
-        if [ $(expr index "${str}" "${c}") -gt 0 ]; then
-            return 0
-        fi
-    done
-    return 1
-}
-
-_pacman ()
-{
-  local a arg toparse op mod cur
-  COMPREPLY=()
-
-  # This argument parsing is done so we can check for flag existance later
-  #  right now it's a tad crappy, but does the job
-  for (( i=1; i < ${#COMP_WORDS[@]}-1; i++ )); do
-	a=${COMP_WORDS[i]}
-    arg="${a:0:2}"
-    toparse="${a:2}"
-
-    case "${arg}" in
-      -@(A|U|F|R|S|Q|h|V))
-        op="${arg/-}"
-        mod="${mod}${a:2}"
-        ;;
-      --)
-        arg="${a:2}"
-        case "${arg}" in
-          add) op="A" ;;
-          remove) op="R" ;;
-          upgrade) op="U" ;;
-          freshen) op="F" ;;
-          query) op="Q" ;;
-          sync) op="S" ;;
-          help) op="h" ;;
-          version) op="V" ;;
-          verbose) mod="${mod}v" ;;
-          root) mod="${mod}r" ;;
-          dbpath) mod="${mod}b" ;;
-          nodeps) mod="${mod}d" ;;
-          force) mod="${mod}f" ;;
-          groups) mod="${mod}g" ;;
-          info) mod="${mod}i" ;;
-          list) mod="${mod}l" ;;
-          print-uris) mod="${mod}p" ;;
-          search) mod="${mod}s" ;;
-          sysupgrade) mod="${mod}u" ;;
-          downloadonly) mod="${mod}w" ;;
-          refresh) mod="${mod}y" ;;
-          orphans) mod="${mod}e" ;;
-          foreign) mod="${mod}m" ;;
-          owns) mod="${mod}o" ;;
-          file) mod="${mod}p" ;;
-          search) mod="${mod}s" ;;
-          cascade) mod="${mod}c" ;;
-          nodeps) mod="${mod}d" ;;
-          dbonly) mod="${mod}k" ;;
-          nosave) mod="${mod}n" ;;
-          recursive) mod="${mod}s" ;;
-        esac ;;
-      *) toparse="${a}" ;;
-    esac
-
-    arglen=$(( ${#toparse}-1 ))
-    for c in $(seq 0 "${arglen}"); do
-      arg=${toparse:$c:1}
-      [ "${arg}" != "-" ] && mod="${mod}${arg}"
-    done
-  done
-
-  cur=${COMP_WORDS[COMP_CWORD]}
-
-  if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
-        COMPREPLY=( $( compgen -W '\
-            -A --add \
-            -F --freshen \
-            -h --help \
-            -Q --query \
-            -R --remove \
-            -S --sync \
-            -U --upgrade \
-            -V --version \
-            ' -- $cur ) )
-        rem_selected
-        return 0
-  fi
-
-  if [[ "$cur" == -* ]]; then
-    case "${op}" in
-      A|U|F)
-        COMPREPLY=( $( compgen -W '\
-           -d --nodeps \
-           -f --force \
-           -h --help \
-           --config \
-           --noconfirm \
-           --noprogressbar \
-           -v --verbose \
-           -r --root \
-           -b --dbpath \
-           ' -- $cur ) )
-        return 0
-      ;;
-      R)
-        COMPREPLY=( $( compgen -W '\
-          -c --cascade \
-          -d --nodeps \
-          -f --force \
-          -h --help \
-          -k --dbonly \
-          -n --nosave \
-          -s --recursive \
-           --config \
-           --noconfirm \
-           --noprogressbar \
-          -v --verbose \
-          -r --root \
-          -b --dbpath \
-          ' -- $cur ) )
-        return 0
-      ;;
-      S)
-        COMPREPLY=( $( compgen -W '\
-          -c --clean \
-          -d --nodeps \
-          -f --force \
-          -g --groups \
-          -h --help \
-          -i --info \
-          -l --list \
-          -p --print-uris \
-          -s --search \
-          -u --sysupgrade \
-          -w --downloadonly \
-          -y --refresh \
-           --config \
-           --noconfirm \
-           --noprogressbar \
-          -v --verbose \
-          -r --root \
-          -b --dbpath \
-          ' -- $cur ) )
-        return 0
-      ;;
-      Q)
-        COMPREPLY=( $( compgen -W '\
-          -e --orphans \
-          -g --groups \
-          -h --help \
-          -i --info \
-          -l --list \
-          -m --foreign \
-          -o --owns \
-          -p --file \
-          -s --search \
-           --config \
-           --noconfirm \
-           --noprogressbar \
-          -v --verbose \
-          -r --root \
-          -b --dbpath \
-          ' -- $cur ) )
-        return 0
-      ;;
-    esac
-    rem_selected
-  else
-    case "${op}" in
-      A|U)
-		COMPREPLY=( $( compgen -d -- "$cur" ) \
-                    $( compgen -f -X '!*.pkg.tar.gz' -- "$cur" ) )
-        return 0
-      ;;
-      h|V)
-        COMPREPLY=''
-        return 0
-      ;;
-      Q)
-        if _instring $mod g; then
-            _installed_groups
-        elif _instring $mod o; then
-			COMPREPLY=( $( compgen -d -- "$cur" ) \
-                        $( compgen -f -- "$cur" ) )
-        elif _instring $mod p; then
-			COMPREPLY=( $( compgen -d -- "$cur" ) \
-                        $( compgen -f -X '!*.pkg.tar.gz' -- "$cur" ) )
-        else
-            _installed_pkgs
-        fi
-        return 0
-      ;;
-      R)
-        _installed_pkgs
-        return 0
-      ;;
-      S)
-        if _instring $mod l; then
-            _available_repos
-        else
-            _available_pkgs
-        fi
-        return 0
-      ;;
-    esac
-  fi
-
-  rem_selected
-}
-complete -o filenames -F _pacman pacman
Index: extra/system/bash-completion/archlinux_fixes.patch
diff -u extra/system/bash-completion/archlinux_fixes.patch:1.2 extra/system/bash-completion/archlinux_fixes.patch:removed
--- extra/system/bash-completion/archlinux_fixes.patch:1.2	Sat Mar 25 06:26:53 2006
+++ extra/system/bash-completion/archlinux_fixes.patch	Wed Jan  9 23:10:36 2008
@@ -1,21 +0,0 @@
-diff -u bash_completion.orig/bash_completion bash_completion/bash_completion
---- bash_completion.orig/bash_completion	2005-07-21 14:21:22.000000000 -0500
-+++ bash_completion/bash_completion	2006-02-15 23:46:23.000000000 -0600
-@@ -691,7 +691,7 @@
- 	COMPREPLY=()
- 	cur=${COMP_WORDS[COMP_CWORD]}
- 
--	COMPREPLY=( $( /sbin/lsmod | \
-+	COMPREPLY=( $( /bin/lsmod | \
- 		  awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' 2>/dev/null ))
- 	return 0
- }
-@@ -712,7 +712,7 @@
- 	# behave like lsmod for modprobe -r
- 	if [ $1 = "modprobe" ] &&
- 	   [ "${COMP_WORDS[1]}" = "-r" ]; then
--		COMPREPLY=( $( /sbin/lsmod | \
-+		COMPREPLY=( $( /bin/lsmod | \
- 				awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' ) )
- 		return 0
- 	fi
Index: extra/system/bash-completion/completion_updates.patch
diff -u /dev/null extra/system/bash-completion/completion_updates.patch:1.1
--- /dev/null	Wed Jan  9 23:10:36 2008
+++ extra/system/bash-completion/completion_updates.patch	Wed Jan  9 23:10:36 2008
@@ -0,0 +1,60 @@
+--- bash_completion	2006-03-01 10:20:18.000000000 -0600
++++ bash_completion	2008-01-09 22:05:55.000000000 -0600
+@@ -29,13 +29,17 @@
+ 
+ # Alter the following to reflect the location of this file.
+ #
++(readonly -p | grep " BASH_COMPLETION=" 2>&1 >/dev/null) || 
+ {
+-  # These declarations must go within braces in order to be able to silence
+-  # readonly variable errors.
+   BASH_COMPLETION="${BASH_COMPLETION:-/etc/bash_completion}"
++  readonly BASH_COMPLETION
++}
++
++(readonly -p | grep " BASH_COMPLETION_DIR=" 2>&1 >/dev/null) ||
++{
+   BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/etc/bash_completion.d}"
+-} 2>/dev/null || :
+-readonly BASH_COMPLETION BASH_COMPLETION_DIR
++  readonly BASH_COMPLETION_DIR
++}
+ 
+ # Set a couple of useful vars
+ #
+@@ -94,7 +98,7 @@
+ complete -f -X '!*.texi*' makeinfo texi2html
+ complete -f -X '!*.@(?(la)tex|?(LA)TEX|texi|TEXI|dtx|DTX|ins|INS)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi
+ complete -f -X '!*.@(mp3|MP3)' mpg123 mpg321 madplay
+-complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|vcd|ps|pes|fli|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG)' xine aaxine fbxine kaffeine
++complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|mkv|MKV|bin|dat|vcd|ps|pes|fli|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG)' xine aaxine fbxine kaffeine gxine oxine
+ complete -f -X '!*.@(avi|asf|wmv)' aviplay
+ complete -f -X '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay
+ complete -f -X '!*.@(mpg|mpeg|avi|mov|qt)' xanim
+@@ -103,7 +107,7 @@
+ complete -f -X '!*.fig' xfig
+ complete -f -X '!*.@(mid?(i)|MID?(I))' playmidi
+ complete -f -X '!*.@(mid?(i)|MID?(I)|rmi|RMI|rcp|RCP|[gr]36|[GR]36|g18|G18|mod|MOD|xm|XM|it|IT|x3m|X3M)' timidity
+-complete -f -X '*.@(o|so|so.!(conf)|a|t@(ar?(.@(Z|gz|bz?(2)))|gz|bz?(2))|rpm|zip|ZIP|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' vi vim gvim rvim view rview rgvim rgview gview
++complete -f -X '*.@(o|so|so.!(conf)|a|rpm|zip|ZIP|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' vi vim gvim rvim view rview rgvim rgview gview
+ complete -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' emacs
+ complete -f -X '!*.@(exe|EXE|com|COM|scr|SCR|exe.so)' wine
+ complete -f -X '!*.@(zip|ZIP|z|Z|gz|GZ|tgz|TGZ)' bzme
+@@ -698,7 +702,7 @@
+ 	COMPREPLY=()
+ 	cur=${COMP_WORDS[COMP_CWORD]}
+ 
+-	COMPREPLY=( $( /sbin/lsmod | \
++	COMPREPLY=( $( /bin/lsmod | \
+ 		  awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' 2>/dev/null ))
+ 	return 0
+ }
+@@ -719,7 +723,7 @@
+ 	# behave like lsmod for modprobe -r
+ 	if [ $1 = "modprobe" ] &&
+ 	   [ "${COMP_WORDS[1]}" = "-r" ]; then
+-		COMPREPLY=( $( /sbin/lsmod | \
++		COMPREPLY=( $( /bin/lsmod | \
+ 				awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' ) )
+ 		return 0
+ 	fi
Index: extra/system/bash-completion/readonly_vars.patch
diff -u extra/system/bash-completion/readonly_vars.patch:1.1 extra/system/bash-completion/readonly_vars.patch:removed
--- extra/system/bash-completion/readonly_vars.patch:1.1	Tue Sep 18 00:09:03 2007
+++ extra/system/bash-completion/readonly_vars.patch	Wed Jan  9 23:10:36 2008
@@ -1,24 +0,0 @@
---- /etc/bash_completion	2006-05-25 11:59:31.000000000 -0400
-+++ bash_completion	2007-09-17 23:39:01.000000000 -0400
-@@ -29,13 +29,17 @@
- 
- # Alter the following to reflect the location of this file.
- #
-+(readonly -p | grep " BASH_COMPLETION=" 2>&1 >/dev/null) || 
- {
--  # These declarations must go within braces in order to be able to silence
--  # readonly variable errors.
-   BASH_COMPLETION="${BASH_COMPLETION:-/etc/bash_completion}"
-+  readonly BASH_COMPLETION
-+}
-+
-+(readonly -p | grep " BASH_COMPLETION_DIR=" 2>&1 >/dev/null) ||
-+{
-   BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/etc/bash_completion.d}"
--} 2>/dev/null || :
--readonly BASH_COMPLETION BASH_COMPLETION_DIR
-+  readonly BASH_COMPLETION_DIR
-+}
- 
- # Set a couple of useful vars
- #
Index: extra/system/bash-completion/xine.extra
diff -u extra/system/bash-completion/xine.extra:1.1 extra/system/bash-completion/xine.extra:removed
--- extra/system/bash-completion/xine.extra:1.1	Thu May 25 12:02:23 2006
+++ extra/system/bash-completion/xine.extra	Wed Jan  9 23:10:36 2008
@@ -1,4 +0,0 @@
-# Thanks to Travis Willard (Cerebral)
-complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|mkv|MKV|bin|dat|vcd|ps|pes|fli|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG)' \
-    xine aaxine fbxine kaffeine gxine oxine
-




More information about the arch-commits mailing list