/[gentoo-x86]/eclass/bash-completion.eclass
Gentoo

Diff of /eclass/bash-completion.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 Revision 1.8
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.7 2004/12/30 00:18:25 ka0ttic Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.8 2005/01/02 11:56:08 ka0ttic Exp $
4# 4#
5# Simple eclass that provides an interface for installing 5# Simple eclass that provides an interface for installing
6# contributed (ie not included in bash-completion proper) 6# contributed (ie not included in bash-completion proper)
7# bash-completion scripts. 7# bash-completion scripts.
8# 8#
14INHERITED="${INHERITED} ${ECLASS}" 14INHERITED="${INHERITED} ${ECLASS}"
15EXPORT_FUNCTIONS pkg_postinst 15EXPORT_FUNCTIONS pkg_postinst
16 16
17IUSE="${IUSE} bash-completion" 17IUSE="${IUSE} bash-completion"
18 18
19#RDEPEND="${RDEPEND} 19RDEPEND="${RDEPEND}
20# bash-completion? ( app-shells/bash-completion-config )" 20 bash-completion? ( app-shells/bash-completion-config )"
21 21
22# dobashcompletion <file> <new file> 22# dobashcompletion <file> <new file>
23# First arg, <file>, is required and is the location of the bash-completion 23# First arg, <file>, is required and is the location of the bash-completion
24# script to install. Second arg, <new file>, is optional and specifies an 24# script to install. Second arg, <new file>, is optional and specifies an
25# alternate filename to install as. 25# alternate filename to install as.
36 36
37bash-completion_pkg_postinst() { 37bash-completion_pkg_postinst() {
38 if useq bash-completion ; then 38 if useq bash-completion ; then
39 echo 39 echo
40 einfo "To enable command-line completion for ${PN}, run:" 40 einfo "To enable command-line completion for ${PN}, run:"
41
42 # NOTE: this is temporary; bash-completion-config will be in RDEPEND
43 # once it goes stable and can be used as a dependency.
44 if has_version 'app-shells/bash-completion-config' ; then
45 einfo 41 einfo
46 einfo " bash-completion-config --install ${BASH_COMPLETION_NAME}" 42 einfo " bash-completion-config --install ${BASH_COMPLETION_NAME}"
47 einfo 43 einfo
48 einfo "to install locally, or" 44 einfo "to install locally, or"
49 einfo 45 einfo
50 einfo " bash-completion-config --global --install ${BASH_COMPLETION_NAME}" 46 einfo " bash-completion-config --global --install ${BASH_COMPLETION_NAME}"
51 einfo 47 einfo
52 einfo "to install system-wide." 48 einfo "to install system-wide."
53 einfo "Read bash-completion-config(1) for more information." 49 einfo "Read bash-completion-config(1) for more information."
54 else
55 einfo " ln -s /usr/share/bash-completion/${BASH_COMPLETION_NAME} \\ "
56 einfo " /etc/bash_completion.d/"
57 fi
58 echo 50 echo
59 fi 51 fi
60} 52}

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20