summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2009-10-15 13:52:36 +0000
committerJeremy Olexa <darkside@gentoo.org>2009-10-15 13:52:36 +0000
commit598f4182522de694f3c7c5d63d865887de57a9cd (patch)
treec163ee9d024179c76c08f1b7be6bd5d3afde3cc0 /app-shells
parentamd64/x86 stable, bug #288261 (diff)
downloadgentoo-2-598f4182522de694f3c7c5d63d865887de57a9cd.tar.gz
gentoo-2-598f4182522de694f3c7c5d63d865887de57a9cd.tar.bz2
gentoo-2-598f4182522de694f3c7c5d63d865887de57a9cd.zip
Version bump. Many new completion modules. Note: the 'base' module is always enabled now.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash-completion/ChangeLog10
-rw-r--r--app-shells/bash-completion/bash-completion-1.0-r3.ebuild93
-rw-r--r--app-shells/bash-completion/bash-completion-1.1.ebuild64
-rw-r--r--app-shells/bash-completion/files/bash-completion.sh71
4 files changed, 108 insertions, 130 deletions
diff --git a/app-shells/bash-completion/ChangeLog b/app-shells/bash-completion/ChangeLog
index f88e9fd749b1..1188bcb3654d 100644
--- a/app-shells/bash-completion/ChangeLog
+++ b/app-shells/bash-completion/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-shells/bash-completion
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.192 2009/10/09 16:43:49 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.193 2009/10/15 13:52:35 darkside Exp $
+
+*bash-completion-1.1 (15 Oct 2009)
+
+ 15 Oct 2009; Jeremy Olexa <darkside@gentoo.org>
+ -bash-completion-1.0-r3.ebuild, +bash-completion-1.1.ebuild,
+ files/bash-completion.sh:
+ Version bump. Many new completion modules. Note: the 'base' module is
+ always enabled now.
09 Oct 2009; Raúl Porcel <armin76@gentoo.org>
bash-completion-1.0-r5.ebuild:
diff --git a/app-shells/bash-completion/bash-completion-1.0-r3.ebuild b/app-shells/bash-completion/bash-completion-1.0-r3.ebuild
deleted file mode 100644
index a3e84c43c187..000000000000
--- a/app-shells/bash-completion/bash-completion-1.0-r3.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-1.0-r3.ebuild,v 1.9 2009/05/31 18:22:46 ranger Exp $
-
-EAPI="2"
-
-inherit eutils
-
-DESCRIPTION="Programmable Completion for bash"
-HOMEPAGE="http://bash-completion.alioth.debian.org/"
-SRC_URI="mirror://debian/pool/main/b/bash-completion/${PN}_${PV}.orig.tar.gz ->
-bash-completion-1.0.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND="app-admin/eselect
- || (
- >=app-shells/bash-2.05a
- app-shells/zsh
- )
- sys-apps/miscfiles
- !<=games-misc/cowsay-3.03-r1"
-PDEPEND="app-shells/gentoo-bashcomp"
-
-src_prepare() {
- epatch "${FILESDIR}/${PN}-1.0-gentoo.patch"
- epatch "${FILESDIR}/${PN}-1.0-bash4.patch"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
-
- # Upstream will soon be splitting this for us.
- # split /etc/bash_completion into three parts:
- # 1. /usr/share/bash-completion/.pre -- hidden from eselect
- # 2. /usr/share/bash-completion/base -- eselectable
- # 3. /usr/share/bash-completion/.post -- hidden from eselect
- dodir /usr/share/bash-completion
- awk -v D="$D" '
- BEGIN { out=".pre" }
- /^# A lot of the following one-liners/ { out="base" }
- /^# start of section containing completion functions called by other functions/ { out=".pre" }
- /^# start of section containing completion functions for bash built-ins/ { out="base" }
- /^# source completion directory/ { out="" }
- /^unset -f have/ { out=".post" }
- out != "" { print > D"/usr/share/bash-completion/"out }' \
- bash_completion || die "failed to split bash_completion"
-
- dodir /etc/profile.d
- cp bash_completion.sh "${D}/etc/profile.d/bash-completion.sh" \
- || die "cp failed"
-
- dodoc AUTHORS CHANGES README TODO || die "dodocs failes"
-
- # bug 146726
- rm "${D}/etc/bash_completion.d/svk" || die "rm failed"
-
- # Upstream provides no easy way to move modules. sigh
- dodir /usr/share/bash-completion
- mv "${D}"/etc/bash_completion.d/* "${D}/usr/share/bash-completion/" \
- || die "installation failed to move files"
- # cleanup the mess
- rm -r "${D}"/etc/bash_completion{,.d} || die "rm failed"
-}
-
-pkg_postinst() {
- elog "Any user can enable the base completions without editing their"
- elog ".bashrc by running:"
- elog
- elog " eselect bashcomp enable base"
- elog
- elog "The system administrator can also be enable this globally with"
- elog
- elog " eselect bashcomp enable --global base"
- elog
- elog "Additional completion functions can also be enabled or"
- elog "disabled using eselect's bashcomp module."
- elog
- elog "If you use non-login shells you still need to source"
- elog "/etc/profile.d/bash-completion.sh in your ~/.bashrc."
-
- if has_version 'app-shells/zsh' ; then
- elog "If you are interested in using the provided bash completion functions with"
- elog "zsh, valuable tips on the effective use of bashcompinit are available:"
- elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
- #elog " http://zshwiki.org/ZshSwitchingTo" (doesn't exist)
- elog
- fi
-}
diff --git a/app-shells/bash-completion/bash-completion-1.1.ebuild b/app-shells/bash-completion/bash-completion-1.1.ebuild
new file mode 100644
index 000000000000..cbf24f91d387
--- /dev/null
+++ b/app-shells/bash-completion/bash-completion-1.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-1.1.ebuild,v 1.1 2009/10/15 13:52:35 darkside Exp $
+
+EAPI="2"
+
+DESCRIPTION="Programmable Completion for bash"
+HOMEPAGE="http://bash-completion.alioth.debian.org/"
+SRC_URI="http://bash-completion.alioth.debian.org/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="app-admin/eselect
+ || ( app-shells/bash app-shells/zsh )
+ sys-apps/miscfiles"
+PDEPEND="app-shells/gentoo-bashcomp"
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ dodir /etc/profile.d
+ cp "${FILESDIR}/bash-completion.sh" \
+ "${D}/etc/profile.d/bash-completion.sh" || die "cp failed"
+
+ dodir /usr/share/bash-completion
+ mv "${D}"/etc/bash_completion.d/* "${D}/usr/share/bash-completion/" \
+ || die "installation failed to move files"
+ rm -r "${D}"/etc/bash_completion.d || die "rm failed"
+ mv "${D}"/etc/bash_completion \
+ "${D}/usr/share/bash-completion/.bash-completion" || die "mv failed"
+ dodoc AUTHORS README TODO || die "dodocs failes"
+}
+
+pkg_postinst() {
+ ewarn "There is no more base module. It is always enabled due to"
+ ewarn "number of false bugs and ease of maintainership. Please remove"
+ ewarn "the base module symlinks that you have."
+ elog "Any user can enable the module completions without editing their"
+ elog ".bashrc by running:"
+ elog
+ elog " eselect bashcomp enable <module>"
+ elog
+ elog "The system administrator can also be enable this globally with"
+ elog
+ elog " eselect bashcomp enable --global <module>"
+ elog
+ elog "Additional completion modules can be found by running"
+ elog
+ elog " eselect bashcomp list"
+ elog
+ elog "If you use non-login shells you still need to source"
+ elog "/etc/profile.d/bash-completion.sh in your ~/.bashrc."
+
+ if has_version 'app-shells/zsh' ; then
+ elog "If you are interested in using the provided bash completion functions with"
+ elog "zsh, valuable tips on the effective use of bashcompinit are available:"
+ elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
+ elog
+ fi
+}
diff --git a/app-shells/bash-completion/files/bash-completion.sh b/app-shells/bash-completion/files/bash-completion.sh
index aca4fac00e95..aa84784ff74a 100644
--- a/app-shells/bash-completion/files/bash-completion.sh
+++ b/app-shells/bash-completion/files/bash-completion.sh
@@ -1,39 +1,38 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh,v 1.3 2008/06/15 23:22:32 zlin Exp $
-#
-# START bash completion -- do not remove this line
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh,v 1.4 2009/10/15 13:52:36 darkside Exp $
-# Need interactive bash with complete builtin
-if [ -n "$PS1" -a -n "$BASH_VERSION" -a \
- "`type -t complete 2>/dev/null`" = builtin ]
-then
+# Check for interactive bash and that we haven't already been sourced.
+[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
+
+# Check for recent enough version of bash.
+bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
+if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -gt 2 ]; then
_load_completions() {
- declare f x loaded_pre=false
- for f; do
- if [[ -f $f ]]; then
- # Prevent loading base twice, initially and via glob
- if $loaded_pre && [[ $f == */base ]]; then
- continue
- fi
+ declare f x loaded_base=false
+ for f; do
+ if [[ -f $f ]]; then
+ # Prevent loading base twice, initially and via glob
+ if $loaded_base && [[ $f == */.bash-completion ]]; then
+ continue
+ fi
- # Some modules, including base, depend on the definitions
- # in .pre. See the ebuild for how this is created.
- if ! $loaded_pre; then
- if [[ ${BASH_COMPLETION-unset} == unset ]]; then
- BASH_COMPLETION=/usr/share/bash-completion/base
- fi
- source /usr/share/bash-completion/.pre
- loaded_pre=true
- fi
+ # Some modules, including base, depend on the definitions
+ # in .pre. See the ebuild for how this is created.
+ if ! $loaded_base; then
+ if [[ ${BASH_COMPLETION-unset} == unset ]]; then
+ BASH_COMPLETION=/usr/share/bash-completion/.bash-completion
+ fi
+ source /usr/share/bash-completion/.bash-completion
+ loaded_base=true
+ fi
- source "$f"
- fi
- done
+ source "$f"
+ fi
+ done
- # Clean up
- $loaded_pre && source /usr/share/bash-completion/.post
- unset -f _load_completions # not designed to be called more than once
+ # Clean up
+ unset -f _load_completions # not designed to be called more than once
}
# 1. Load base, if eselected. This was previously known as
@@ -41,12 +40,12 @@ then
# 2. Load completion modules, maintained via eselect bashcomp --global
# 3. Load user completion modules, maintained via eselect bashcomp
# 4. Load user completion file last, overrides modules at user discretion
+ # This order is subject to change once upstream decides on something.
_load_completions \
- /etc/bash_completion.d/base \
- ~/.bash_completion.d/base \
- /etc/bash_completion.d/* \
- ~/.bash_completion.d/* \
- ~/.bash_completion
+ /usr/share/bash-completion/.bash-completion
+ /etc/bash_completion.d/* \
+ ~/.bash_completion.d/* \
+ ~/.bash_completion
fi
-# END bash completion -- do not remove this line
+unset bash bminor bmajor