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
commit23ba1debf1161b3ed6249201985411138ea269d9 (patch)
treecf93ea7a341a8b768471a14b9d64dd2ecbdb967e /games-misc
parentremove patch added upstream for beta2 (diff)
downloadgentoo-2-23ba1debf1161b3ed6249201985411138ea269d9.tar.gz
gentoo-2-23ba1debf1161b3ed6249201985411138ea269d9.tar.bz2
gentoo-2-23ba1debf1161b3ed6249201985411138ea269d9.zip
Added cowsay command-line completion.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'games-misc')
-rw-r--r--games-misc/cowsay/ChangeLog6
-rw-r--r--games-misc/cowsay/Manifest5
-rw-r--r--games-misc/cowsay/cowsay-3.03.ebuild5
-rw-r--r--games-misc/cowsay/files/cowsay.bashcomp35
4 files changed, 47 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..85d000037311 100644
--- a/games-misc/cowsay/Manifest
+++ b/games-misc/cowsay/Manifest
@@ -1,4 +1,5 @@
-MD5 b5d3a35765e7598cd3690662c2fcc308 ChangeLog 1139
-MD5 b39a1f76f4a022bd8ce76fcd90082e3c cowsay-3.03.ebuild 1133
+MD5 688a85acc0c58506d3f921649fefc9d6 ChangeLog 1275
MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
+MD5 e967a781dc4499cbf5c1c40a13f39929 cowsay-3.03.ebuild 1203
+MD5 357ff817516797e77bdb8db1e4d90c8d files/cowsay.bashcomp 993
MD5 2e5e04a0c30b4e7e3dab7781049e7d99 files/digest-cowsay-3.03 62
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 :