summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2004-11-07 01:42:54 +0000
committerAaron Walker <ka0ttic@gentoo.org>2004-11-07 01:42:54 +0000
commit9655ace25cf0a6bba045a05bac757b907468939d (patch)
tree7755c766d6f4b84f7b2b60fc94ad7b836460f377 /eclass/bash-completion.eclass
parentRemoved stray digest. (Manifest recommit) (diff)
downloadgentoo-2-9655ace25cf0a6bba045a05bac757b907468939d.tar.gz
gentoo-2-9655ace25cf0a6bba045a05bac757b907468939d.tar.bz2
gentoo-2-9655ace25cf0a6bba045a05bac757b907468939d.zip
Added (and exported) default pkg_postinst
Diffstat (limited to 'eclass/bash-completion.eclass')
-rw-r--r--eclass/bash-completion.eclass30
1 files changed, 28 insertions, 2 deletions
diff --git a/eclass/bash-completion.eclass b/eclass/bash-completion.eclass
index 95758eb2d47d..dbfa8aa1542c 100644
--- a/eclass/bash-completion.eclass
+++ b/eclass/bash-completion.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.4 2004/10/31 12:59:10 ka0ttic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.5 2004/11/07 01:42:54 ka0ttic Exp $
#
# Simple eclass that provides an interface for installing
# contributed (ie not included in bash-completion proper)
@@ -12,11 +12,12 @@
ECLASS="bash-completion"
INHERITED="${INHERITED} ${ECLASS}"
+EXPORT_FUNCTIONS pkg_postinst
IUSE="${IUSE} bash-completion"
#RDEPEND="${RDEPEND}
-# bash-completion? ( app-shells/bash-completion )"
+# bash-completion? ( app-shells/bash-completion-config )"
# dobashcompletion <file> <new file>
# First arg, <file>, is required and is the location of the bash-completion
@@ -30,3 +31,28 @@ dobashcompletion() {
newins "$1" "${2:-${1##*/}}" || die "Failed to install $1"
fi
}
+
+bash-completion_pkg_postinst() {
+ if useq bash-completion ; then
+ echo
+ einfo "To enable command-line completion for ${PN}, run:"
+
+ # NOTE: this is temporary; bash-completion-config will be in RDEPEND
+ # once it goes stable and can be used as a dependency.
+ if has_version 'app-shells/bash-completion-config' ; then
+ einfo
+ einfo " bash-completion-config --install ${PN}"
+ einfo
+ einfo "to install locally, or"
+ einfo
+ einfo " bash-completion-config --global --install ${PN}"
+ einfo
+ einfo "to install system-wide."
+ einfo "Read bash-completion-config(1) for more information."
+ else
+ einfo " ln -s /usr/share/bash-completion/${PN} \\ "
+ einfo " /etc/bash_completion.d/"
+ fi
+ echo
+ fi
+}