summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2005-02-06 02:00:33 +0000
committerAaron Walker <ka0ttic@gentoo.org>2005-02-06 02:00:33 +0000
commit0ab85aaed69c1e8d54771215363210475feb1def (patch)
tree69ae1b2bf3936f58fb993fa8afd05ab93c4e3827 /app-misc
parentstable on amd64 (diff)
downloadgentoo-2-0ab85aaed69c1e8d54771215363210475feb1def.tar.gz
gentoo-2-0ab85aaed69c1e8d54771215363210475feb1def.tar.bz2
gentoo-2-0ab85aaed69c1e8d54771215363210475feb1def.zip
Added figlet command-line completion; closes bug 80436.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/figlet/ChangeLog6
-rw-r--r--app-misc/figlet/Manifest7
-rw-r--r--app-misc/figlet/figlet-221-r1.ebuild5
-rw-r--r--app-misc/figlet/files/figlet.bashcomp52
4 files changed, 64 insertions, 6 deletions
diff --git a/app-misc/figlet/ChangeLog b/app-misc/figlet/ChangeLog
index 390e8cb47778..db696f2a21eb 100644
--- a/app-misc/figlet/ChangeLog
+++ b/app-misc/figlet/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-misc/figlet
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/figlet/ChangeLog,v 1.14 2005/01/01 15:02:00 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/figlet/ChangeLog,v 1.15 2005/02/06 02:00:33 ka0ttic Exp $
+
+ 05 Feb 2005; Aaron Walker <ka0ttic@gentoo.org> +files/figlet.bashcomp,
+ figlet-221-r1.ebuild:
+ Added figlet command-line completion; closes bug 80436.
10 Jul 2004; Tom Martin <slarti@gentoo.org> figlet-221-r1.ebuild:
Marked ~amd64.
diff --git a/app-misc/figlet/Manifest b/app-misc/figlet/Manifest
index 95708e4445d1..194b27300bf8 100644
--- a/app-misc/figlet/Manifest
+++ b/app-misc/figlet/Manifest
@@ -1,6 +1,7 @@
-MD5 748b087e01d7f4cbba49e5168e0f8cfc ChangeLog 2136
-MD5 90d4da98c9faa3660aca8250e502e0ba figlet-221-r1.ebuild 1551
+MD5 b4e9d214f66a1157f4d81caf932fa899 figlet-221-r1.ebuild 1613
+MD5 73ff3a66b1540bc811c82b247084cf22 ChangeLog 2292
MD5 27c80a8d690d932f131215d791821fcd metadata.xml 253
-MD5 3a2551bb3e1052d837bd6852df170706 files/digest-figlet-221-r1 203
MD5 e2d8534fe03c0cd75ce80993267a59f5 files/figlet-22-r1-gentoo.diff 1110
MD5 33b24c1ec85f5424d660e01f97d383a0 files/figlet-221-gentoo.diff 1029
+MD5 5b0ccb5a795579dcb4d9da6878b5233e files/figlet.bashcomp 1389
+MD5 3a2551bb3e1052d837bd6852df170706 files/digest-figlet-221-r1 203
diff --git a/app-misc/figlet/figlet-221-r1.ebuild b/app-misc/figlet/figlet-221-r1.ebuild
index 17db9875df74..b3ce7c6b7d25 100644
--- a/app-misc/figlet/figlet-221-r1.ebuild
+++ b/app-misc/figlet/figlet-221-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/figlet/figlet-221-r1.ebuild,v 1.7 2005/01/01 15:02:00 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/figlet/figlet-221-r1.ebuild,v 1.8 2005/02/06 02:00:33 ka0ttic Exp $
-inherit eutils
+inherit eutils bash-completion
MY_P=${P/-/}
S=${WORKDIR}/${MY_P}
@@ -54,4 +54,5 @@ src_install() {
install || die "make install failed"
dodoc README figfont.txt || die "dodoc failed"
+ dobashcompletion ${FILESDIR}/figlet.bashcomp
}
diff --git a/app-misc/figlet/files/figlet.bashcomp b/app-misc/figlet/files/figlet.bashcomp
new file mode 100644
index 000000000000..6b7934d76c8a
--- /dev/null
+++ b/app-misc/figlet/files/figlet.bashcomp
@@ -0,0 +1,52 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/figlet/files/figlet.bashcomp,v 1.1 2005/02/06 02:00:33 ka0ttic Exp $
+
+# bash command-line completion for figlet
+# author: Aaron Walker <ka0ttic@gentoo.org>
+
+_figlet() {
+ local cur prev opts x
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ opts="-f -d -c -l -r -x -t -w -p -n -D -E -C -N -s -S -k -W -o \
+ -m -v -I -L -R -X"
+
+ 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/figlet/*.flf ; do \
+ [[ -f ${x} ]] && { local y=${x##*/} ; echo ${y%.*} ; } \
+ done)" -- $cur) )
+ ;;
+ -d)
+ COMPREPLY=( $(compgen -d -S '/' -- $cur) )
+ ;;
+ -C)
+ COMPREPLY=( $(compgen -f -- $cur) \
+ $(compgen -W "$(\
+ for x in /usr/share/figlet/*.flc ; do \
+ [[ -f ${x} ]] && { local y=${x##*/} ; echo ${y%.*} ; } \
+ done)" -- $cur) )
+ ;;
+ -m)
+ COMPREPLY=( $(compgen -W "$(\
+ for ((x = 1 ; x < 64 ; x++)) ; do \
+ echo ${x} ; \
+ done)" ) )
+ ;;
+ -I)
+ COMPREPLY=( $(compgen -W "-1 0 1 2 3 4" -- $cur) )
+ ;;
+ esac
+}
+complete -o filenames -F _figlet figlet
+
+# vim: set ft=sh tw=80 sw=4 et :