blob: 95758eb2d47d52b7282c6925f91ba245d3ed74a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# 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 $
#
# Simple eclass that provides an interface for installing
# contributed (ie not included in bash-completion proper)
# bash-completion scripts.
#
# Author: Aaron Walker <ka0ttic@gentoo.org>
#
# Please assign any bug reports to shell-tools@gentoo.org.
ECLASS="bash-completion"
INHERITED="${INHERITED} ${ECLASS}"
IUSE="${IUSE} bash-completion"
#RDEPEND="${RDEPEND}
# bash-completion? ( app-shells/bash-completion )"
# dobashcompletion <file> <new file>
# First arg, <file>, is required and is the location of the bash-completion
# script to install. Second arg, <new file>, is optional and specifies an
# alternate filename to install as.
dobashcompletion() {
[ -z "$1" ] && die "usage: dobashcompletion <file> <new file>"
if useq bash-completion ; then
insinto /usr/share/bash-completion
newins "$1" "${2:-${1##*/}}" || die "Failed to install $1"
fi
}
|