summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2005-02-06 14:37:54 +0000
committerAaron Walker <ka0ttic@gentoo.org>2005-02-06 14:37:54 +0000
commit0d9940d9298da586a9a98f532cd910e6296f3529 (patch)
tree78983ac8ddf8c2777ffa6f42e8f4c37a4a82fb8d /games-misc
parentremove patch added upstream for beta2 (diff)
downloadhistorical-0d9940d9298da586a9a98f532cd910e6296f3529.tar.gz
historical-0d9940d9298da586a9a98f532cd910e6296f3529.tar.bz2
historical-0d9940d9298da586a9a98f532cd910e6296f3529.zip
Added cowsay command-line completion.
Package-Manager: portage-2.0.51-r15
Diffstat (limited to 'games-misc')
-rw-r--r--games-misc/cowsay/ChangeLog6
-rw-r--r--games-misc/cowsay/Manifest15
-rw-r--r--games-misc/cowsay/cowsay-3.03.ebuild5
-rw-r--r--games-misc/cowsay/files/cowsay.bashcomp35
4 files changed, 57 insertions, 4 deletions
diff --git a/games-misc/cowsay/ChangeLog b/games-misc/cowsay/ChangeLog
index 8be3e837528a..9590ba96e1ee 100644
--- a/games-misc/cowsay/ChangeLog
+++ b/games-misc/cowsay/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-misc/cowsay
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-misc/cowsay/ChangeLog,v 1.8 2005/02/01 17:18:46 kito Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-misc/cowsay/ChangeLog,v 1.9 2005/02/06 14:37:54 ka0ttic Exp $
+
+ 06 Feb 2005; Aaron Walker <ka0ttic@gentoo.org> +files/cowsay.bashcomp,
+ cowsay-3.03.ebuild:
+ Added cowsay command-line completion.
01 Feb 2005; Kito <kito@gentoo.org> cowsay-3.03.ebuild:
added ~ppc-macos
diff --git a/games-misc/cowsay/Manifest b/games-misc/cowsay/Manifest
index c919ac1c43ce..bacb8f25aa35 100644
--- a/games-misc/cowsay/Manifest
+++ b/games-misc/cowsay/Manifest
@@ -1,4 +1,15 @@
-MD5 b5d3a35765e7598cd3690662c2fcc308 ChangeLog 1139
-MD5 b39a1f76f4a022bd8ce76fcd90082e3c cowsay-3.03.ebuild 1133
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 9aef58a376a847516be9a8f95f92d22c ChangeLog 1278
MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
+MD5 ca150594dae6b655ee5aea4e42ba56c9 cowsay-3.03.ebuild 1206
+MD5 2744086053e49bfd0592c2341dbb8e41 files/cowsay.bashcomp 1095
MD5 2e5e04a0c30b4e7e3dab7781049e7d99 files/digest-cowsay-3.03 62
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.0 (GNU/Linux)
+
+iD8DBQFCBiw1EZCkKN40op4RApp1AKCqX19NehjOsxDHHokk9X582L7nfACfZ0fe
+WCBausYkbjcUoK1k2oDrAD4=
+=pg54
+-----END PGP SIGNATURE-----
diff --git a/games-misc/cowsay/cowsay-3.03.ebuild b/games-misc/cowsay/cowsay-3.03.ebuild
index 14ae1770494e..d996af04674c 100644
--- a/games-misc/cowsay/cowsay-3.03.ebuild
+++ b/games-misc/cowsay/cowsay-3.03.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-misc/cowsay/cowsay-3.03.ebuild,v 1.8 2005/02/01 17:36:04 kito Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-misc/cowsay/cowsay-3.03.ebuild,v 1.9 2005/02/06 14:37:54 ka0ttic Exp $
+
+inherit bash-completion
DESCRIPTION="configurable talking ASCII cow (and other characters)"
HOMEPAGE="http://www.nog.net/~tony/warez/cowsay.shtml"
@@ -35,4 +37,5 @@ src_install() {
dosym cowsay.1.gz /usr/share/man/man1/cowthink.1.gz
dodir "/usr/share/${P}/cows"
cp -r cows "${D}/usr/share/${P}/" || die "cp failed"
+ dobashcompletion ${FILESDIR}/${PN}.bashcomp
}
diff --git a/games-misc/cowsay/files/cowsay.bashcomp b/games-misc/cowsay/files/cowsay.bashcomp
new file mode 100644
index 000000000000..94860b240689
--- /dev/null
+++ b/games-misc/cowsay/files/cowsay.bashcomp
@@ -0,0 +1,35 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/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@gentoo.org>
+
+_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=($(compgen -f -- ${cur}) \
+ $(compgen -W "$(\
+ for x in /usr/share/cowsay-*/cows/*.cow ; do \
+ [[ -f ${x} ]] && { local y=${x##*/} ; echo ${y%.*} ; } \
+ done)" -- ${cur}) )
+ ;;
+ -[eTW])
+ COMPREPLY=()
+ ;;
+ esac
+}
+complete -o filenames -F _cowsay cowsay cowthink
+
+# vim: set ft=sh tw=80 sw=4 et :