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

Diff of /eclass/bash-completion-r1.eclass

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

Revision 1.13 Revision 1.14
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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-r1.eclass,v 1.13 2014/08/27 08:15:27 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion-r1.eclass,v 1.14 2014/09/02 15:28:05 mgorny Exp $
4 4
5# @ECLASS: bash-completion-r1.eclass 5# @ECLASS: bash-completion-r1.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# mgorny@gentoo.org 7# mgorny@gentoo.org
8# @BLURB: A few quick functions to install bash-completion files 8# @BLURB: A few quick functions to install bash-completion files
114 ( 114 (
115 insinto "$(_bash-completion-r1_get_bashcompdir)" 115 insinto "$(_bash-completion-r1_get_bashcompdir)"
116 newins "${@}" 116 newins "${@}"
117 ) 117 )
118} 118}
119
120# @FUNCTION: bashcomp_alias
121# @USAGE: <basename> <alias>...
122# @DESCRIPTION:
123# Alias <basename> completion to one or more commands (<alias>es).
124bashcomp_alias() {
125 debug-print-function ${FUNCNAME} "${@}"
126
127 [[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
128 local base=${1} f
129 shift
130
131 for f; do
132 dosym "${base}" "$(_bash-completion-r1_get_bashcompdir)/${f}"
133 done
134}

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20