[arch-commits] Commit in bash-completion/trunk (6 files)
Aaron Griffin
aaron at archlinux.org
Thu Jun 18 17:08:34 UTC 2009
Date: Thursday, June 18, 2009 @ 13:08:34
Author: aaron
Revision: 42711
upgpkg: bash-completion 1.0-1
Revamp of bash-completion
See FS#11196 and FS#11195
Modified:
bash-completion/trunk/PKGBUILD
bash-completion/trunk/bash_completion.sh
Deleted:
bash-completion/trunk/archlinux_fixes.patch
bash-completion/trunk/completion_updates.patch
bash-completion/trunk/readonly_vars.patch
bash-completion/trunk/xine.extra
--------------------------+
PKGBUILD | 41 +++++++++++++++---------------
archlinux_fixes.patch | 21 ---------------
bash_completion.sh | 22 +++++++---------
completion_updates.patch | 60 ---------------------------------------------
readonly_vars.patch | 24 ------------------
xine.extra | 4 ---
6 files changed, 31 insertions(+), 141 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2009-06-18 17:06:28 UTC (rev 42710)
+++ PKGBUILD 2009-06-18 17:08:34 UTC (rev 42711)
@@ -1,32 +1,33 @@
# $Id$
+# Maintainer: Aaron Griffin <aaron at archlinux.org>
# Contributor: Aurelien Foret <orelien at chez.com>
+# Contributor: Evangelos Foutras <foutrelis at gmail.com>
pkgname=bash-completion
-pkgver=20060301
-pkgrel=9
-pkgdesc="Programmable completion indefinitely extends the type of completion built in bash"
+pkgver=1.0
+pkgrel=1
+pkgdesc="Programmable completion for the bash shell"
arch=(i686 x86_64)
-url='http://www.caliban.org/bash/'
+url="http://bash-completion.alioth.debian.org/"
license=('GPL')
depends=('bash')
-source=(http://www.caliban.org/files/bash/$pkgname-$pkgver.tar.gz
- bash_completion.sh completion_updates.patch)
-md5sums=('9bca1cf97e8f8c73e3ef560cc9dead21'
- 'f7386d73b862ae1dd04afb4f1fa1dd3a'
- 'e1b6eabe924da0b211b11ef63a373725')
+source=(http://bash-completion.alioth.debian.org/files/$pkgname-$pkgver.tar.gz)
+md5sums=('cd1c5648272917fbe0eef4ba30bb93f4')
+options=('force')
-build()
-{
- cd $startdir/src/bash_completion
- 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
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
- mkdir -p $startdir/pkg/etc/bash_completion.d
- install -m644 contrib/* $startdir/pkg/etc/bash_completion.d
+ # fixes for archlinux
+ sed -i 's#/sbin/lsmod#/bin/lsmod#' bash_completion || return 1
- # Mercurial provides it's updated completion for itself
- rm $startdir/pkg/etc/bash_completion.d/hg
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make || return 1
+ make DESTDIR="$pkgdir" install
+ # apache2ctl doesn't work, even when renamed to apachectl (and sed'd)
+ rm "$pkgdir/etc/bash_completion.d/apache2ctl"
+
+ install -Dm755 bash_completion.sh "$pkgdir/etc/profile.d/bash_completion.sh"
}
-
+# vim:set ts=2 sw=2 et:
Deleted: archlinux_fixes.patch
===================================================================
--- archlinux_fixes.patch 2009-06-18 17:06:28 UTC (rev 42710)
+++ archlinux_fixes.patch 2009-06-18 17:08:34 UTC (rev 42711)
@@ -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
Modified: bash_completion.sh
===================================================================
--- bash_completion.sh 2009-06-18 17:06:28 UTC (rev 42710)
+++ bash_completion.sh 2009-06-18 17:08:34 UTC (rev 42711)
@@ -1,14 +1,12 @@
#!/bin/bash
-#
-# /etc/profile.d/bash-completion
-#
-# check if we use bash
-if [ $SHELL = "/bin/bash" ]; then
- bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
- if [ -n "$PS1" ] && [ \( $bmajor -eq 2 -a $bminor '>' 04 \) -o $bmajor -ge 3 ] \
- && [ -f /etc/bash_completion ]; then # interactive shell
- # Source completion code
- . /etc/bash_completion
- fi
- unset bash bmajor bminor
+# Check for bash (and that we haven't already been sourced).
+[ -z "$BASH_VERSION" -o -n "$BASH_COMPLETION" ] && return
+
+# Check for interactive shell.
+if shopt -q login_shell; then
+ if [ -r /etc/bash_completion ]; then
+ # Source completion code.
+ . /etc/bash_completion
+ fi
fi
+
Deleted: completion_updates.patch
===================================================================
--- completion_updates.patch 2009-06-18 17:06:28 UTC (rev 42710)
+++ completion_updates.patch 2009-06-18 17:08:34 UTC (rev 42711)
@@ -1,60 +0,0 @@
---- 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
Deleted: readonly_vars.patch
===================================================================
--- readonly_vars.patch 2009-06-18 17:06:28 UTC (rev 42710)
+++ readonly_vars.patch 2009-06-18 17:08:34 UTC (rev 42711)
@@ -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
- #
Deleted: xine.extra
===================================================================
--- xine.extra 2009-06-18 17:06:28 UTC (rev 42710)
+++ xine.extra 2009-06-18 17:08:34 UTC (rev 42711)
@@ -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