[arch-commits] Commit in bash-completion/trunk (3 files)
Eric Bélanger
eric at archlinux.org
Sat Feb 6 09:38:38 UTC 2010
Date: Saturday, February 6, 2010 @ 04:38:37
Author: eric
Revision: 67317
upgpkg: bash-completion 1.1-3
Fixed cowsay completion (close FS#17421), Removed old patch
Added:
bash-completion/trunk/cowsay.bashcomp
Modified:
bash-completion/trunk/PKGBUILD
Deleted:
bash-completion/trunk/fix-_filedir-on-bash-4.patch
------------------------------+
PKGBUILD | 8 +++++---
cowsay.bashcomp | 34 ++++++++++++++++++++++++++++++++++
fix-_filedir-on-bash-4.patch | 28 ----------------------------
3 files changed, 39 insertions(+), 31 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-02-06 09:14:43 UTC (rev 67316)
+++ PKGBUILD 2010-02-06 09:38:37 UTC (rev 67317)
@@ -5,14 +5,15 @@
pkgname=bash-completion
pkgver=1.1
-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.gz)
-sha256sums=('53369b32493b58c3d0d7d45630c329faa3ca209ed6e7a6c5392a19e67904721b')
+source=(http://bash-completion.alioth.debian.org/files/$pkgname-$pkgver.tar.gz cowsay.bashcomp)
+md5sums=('593d3edcf287b9e9d735049bd4d3f229' 'e9766bdc391caf825cb24e704422987e')
+sha1sums=('0e666ebda3d577571ab62bcecc16e1024922cd18' 'a8620aa1029d46bae92be8a6ea0eb62d737545ef')
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -23,6 +24,7 @@
./configure --prefix=/usr --sysconfdir=/etc
make || return 1
make DESTDIR="$pkgdir" install
+ install -D -m644 "$srcdir/cowsay.bashcomp" "$pkgdir/etc/bash_completion.d/cowsay"
# apache2ctl doesn't work, even when renamed to apachectl (and sed'd)
rm "$pkgdir/etc/bash_completion.d/apache2ctl"
Added: cowsay.bashcomp
===================================================================
--- cowsay.bashcomp (rev 0)
+++ cowsay.bashcomp 2010-02-06 09:38:37 UTC (rev 67317)
@@ -0,0 +1,34 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/games-misc/cowsay/files/cowsay.bashcomp,v 1.1 2005/02/06 14:37:54 ka0ttic Exp $
+
+# bash command-line completion for cowsay
+# Author: Aaron Walker <ka0ttic at gentoo.org>
+# Modified by: Michal Bentkowski <mr.ecik at gmail.com>
+
+_cowsay() {
+ local cur prev opts x
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ opts="-e -f -h -l -n -T -W -b -d -g -p -s -t -w -y"
+
+ if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ fi
+
+ case "${prev}" in
+ -f)
+ COMPREPLY=( $( command ls /usr/share/cowsay| \
+ sed -ne 's/^\('$cur'.*\)\.cow$/\1/p') )
+ return 0
+ ;;
+ -[eTW])
+ COMPREPLY=()
+ ;;
+ esac
+}
+complete -o filenames -F _cowsay cowsay cowthink
+
+# vim: set ft=sh tw=80 sw=4 et :
Deleted: fix-_filedir-on-bash-4.patch
===================================================================
--- fix-_filedir-on-bash-4.patch 2010-02-06 09:14:43 UTC (rev 67316)
+++ fix-_filedir-on-bash-4.patch 2010-02-06 09:38:37 UTC (rev 67317)
@@ -1,28 +0,0 @@
-commit 1421e55aac075e13491cd212b796bdd453214a2c
-Author: Mike Kelly <pioto at pioto.org>
-Date: Thu Apr 2 11:16:46 2009 -0400
-
- Fix _filedir on bash 4.
-
- We don't need to double-quote things for compgen w/ bash 4. Just putting
- each file in double quotes is sufficient.
-
- See: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html
-
-diff --git a/bash_completion b/bash_completion
-index 0246cd8..4d21cf8 100644
---- a/bash_completion
-+++ b/bash_completion
-@@ -209,6 +209,12 @@ quote()
- # results in the original argument
- quote_readline()
- {
-+ if [[ "${BASH_VERSINFO[0]}" -ge 4 ]] ; then
-+ # This function isn't really necessary on bash 4
-+ # See: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html
-+ echo "${1}"
-+ return
-+ fi
- local t="${1//\\/\\\\}"
- echo \'${t//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
- }
More information about the arch-commits
mailing list