mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 17:11:34 +02:00
Added bash-compeltion from upsteam portage.
No changes were made--just deleted the 1.2 and left the 1.3 version, since we don't need the 1.2 version. BUG=chromium-os:13186 TEST=In chroot: 1. sudo USE=bash-completion emerge git 2. eselect bashcomp enable git 3. exit 4. ./enter_chroot.sh 5. __git_ps1 ...validate that this doens't cause an error. Change-Id: I5e125837218cec09c52562486aa551089c5d58b1 Reviewed-on: http://gerrit.chromium.org/gerrit/660 Tested-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Darin Petkov <petkov@chromium.org>
This commit is contained in:
parent
e4a7068bf2
commit
92eb831828
1140
sdk_container/src/third_party/portage-stable/app-shells/bash-completion/ChangeLog
vendored
Normal file
1140
sdk_container/src/third_party/portage-stable/app-shells/bash-completion/ChangeLog
vendored
Normal file
File diff suppressed because it is too large
Load Diff
18
sdk_container/src/third_party/portage-stable/app-shells/bash-completion/Manifest
vendored
Normal file
18
sdk_container/src/third_party/portage-stable/app-shells/bash-completion/Manifest
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA1
|
||||
|
||||
AUX bash-completion.sh 2109 RMD160 fe90ae478a2b50672b733187a359a84fc1f57913 SHA1 e73ca453425abb7eaf26c15f30471f79a9a72dc1 SHA256 98022951b80b4af62cb254b5b738592835785784b5ddad4b8f71187f15f03b80
|
||||
AUX bash-completion.sh-gentoo-1.2 2118 RMD160 26c76bc8c9eaa84286004fecb3d1e5b8de7efb60 SHA1 02b92315b2eacf5340eb4e36092959721fe88939 SHA256 219c4618936960a2b97c0a237c36961835ae21d819e29239a5d4466b75695ebb
|
||||
DIST bash-completion-1.2.tar.bz2 197574 RMD160 665130a75fcedcc0043efb9058012e6d3e1a0309 SHA1 47e6fb919ae227e74172870379b0fe999a2ae70d SHA256 dd09a86134204e4c6b860bfbd5ee8ac46c6b32a54478b967dcf81e8a7839d354
|
||||
DIST bash-completion-1.3.tar.bz2 211899 RMD160 222be4aee5a9542e5b27133d8bfd697c2c95262d SHA1 6a46b93f44c56cc336632ab28d90c0595fbcc98f SHA256 8ebe30579f0f3e1a521013bcdd183193605dab353d7a244ff2582fb3a36f7bec
|
||||
EBUILD bash-completion-1.2.ebuild 2815 RMD160 9f8e5db297206166e19e281d740f98ec9d9b5693 SHA1 29e59d2e235250a1e2c65fdf91e2603c70bf12ba SHA256 d65c732ae621225f0b3e528005e0a4fb31c2d1de2fe8a2e6ed0be699dc6145a9
|
||||
EBUILD bash-completion-1.3.ebuild 2754 RMD160 95219b46cb64dac001e5fa22c2762005696dd750 SHA1 e6edd781867a4775f000e5a9d0fe553be62bc82a SHA256 018ebc7d2eec69a0b3257b8b72b4d9cf8aa4578fd02cbb3809b33aa4df288ee9
|
||||
MISC ChangeLog 40093 RMD160 7468092f51c273f99d10094d2e5f0299fa51086a SHA1 bcc97c523735bbb21faa417bb8c71182820301c8 SHA256 71892b75ec7ee474d523c4ffc9669ffc52135b1f1c56f003cbf36d967b125688
|
||||
MISC metadata.xml 930 RMD160 e6718602012b2cfcb5be5bfc962889bf88f4dc73 SHA1 a585c9cfc0bdb59ee4c7ff1e786bc53d28d36aac SHA256 281bfd91145b2ae2a5c2774802dee741bbe625777b1c4e3eaefdca406e534ba9
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.17 (GNU/Linux)
|
||||
|
||||
iEYEARECAAYFAk2jiR8ACgkQAiZjviIA2XgcGwCdHXgN7IyuhET84QpZ0rgDcsuQ
|
||||
wvkAoIq05DDkLBNiuXy9oBLp4PGT5pEc
|
||||
=GrWk
|
||||
-----END PGP SIGNATURE-----
|
@ -0,0 +1,79 @@
|
||||
# Copyright 1999-2011 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.3.ebuild,v 1.7 2011/04/11 23:05:10 flameeyes Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit prefix
|
||||
|
||||
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 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="app-admin/eselect
|
||||
|| ( >=app-shells/bash-3.2 app-shells/zsh )
|
||||
sys-apps/miscfiles"
|
||||
PDEPEND="app-shells/gentoo-bashcomp"
|
||||
|
||||
src_prepare() {
|
||||
cp "${FILESDIR}"/bash-completion.sh-gentoo-1.2 "${T}"/bash-completion.sh || die
|
||||
eprefixify "${T}"/bash-completion.sh
|
||||
|
||||
find "${S}"/completions -name 'Makefile*' -delete
|
||||
}
|
||||
|
||||
src_configure() { :; } # no-op
|
||||
src_compile() { :; } # no-op
|
||||
|
||||
src_install() {
|
||||
# Gentoo specific bash-completion.sh file.
|
||||
insinto /etc/profile.d
|
||||
doins "${T}"/bash-completion.sh || die
|
||||
|
||||
# All files from contrib/ in source package get installed
|
||||
insinto /usr/share/bash-completion
|
||||
doins -r "${S}"/completions/* || die
|
||||
|
||||
awk -v D="$ED" '
|
||||
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 external programs/ { 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"
|
||||
|
||||
dodoc AUTHORS CHANGES README TODO || die "dodocs failes"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
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 "Make sure you at least enable the base module! Additional completion"
|
||||
elog "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
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
# 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-gentoo-1.2,v 1.1 2010/07/02 15:07:33 darkside Exp $
|
||||
|
||||
# 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 -gt 3 ] || [ $bmajor -eq 3 -a $bminor -ge 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
|
||||
|
||||
# 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="@GENTOO_PORTAGE_EPREFIX@/usr/share/bash-completion/base"
|
||||
fi
|
||||
source "@GENTOO_PORTAGE_EPREFIX@/usr/share/bash-completion/.pre"
|
||||
loaded_pre=true
|
||||
fi
|
||||
|
||||
source "$f"
|
||||
fi
|
||||
done
|
||||
|
||||
# Clean up
|
||||
$loaded_pre && source "@GENTOO_PORTAGE_EPREFIX@/usr/share/bash-completion/.post"
|
||||
unset -f _load_completions # not designed to be called more than once
|
||||
}
|
||||
|
||||
# 1. Load base, if eselected. This was previously known as
|
||||
# /etc/bash_completion
|
||||
# 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 \
|
||||
"@GENTOO_PORTAGE_EPREFIX@/etc/bash_completion.d/base" \
|
||||
~/.bash_completion.d/base \
|
||||
"@GENTOO_PORTAGE_EPREFIX@/etc/bash_completion.d/"* \
|
||||
~/.bash_completion.d/* \
|
||||
~/.bash_completion
|
||||
fi
|
||||
unset bash bmajor bminor
|
17
sdk_container/src/third_party/portage-stable/app-shells/bash-completion/metadata.xml
vendored
Normal file
17
sdk_container/src/third_party/portage-stable/app-shells/bash-completion/metadata.xml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>shell-tools</herd>
|
||||
<longdescription>
|
||||
Since v2.04, bash has allowed you to intelligently program and extend its
|
||||
standard completion behavior to achieve complex command lines with just a
|
||||
few keystrokes. Imagine typing ssh [Tab] and being able to complete on hosts
|
||||
from your ~/.ssh/known_hosts files. Or typing man 3 str [Tab] and getting a
|
||||
list of all string handling functions in the UNIX manual. mount system:
|
||||
[Tab] would complete on all exported file-systems from the host called
|
||||
system, while make [Tab] would complete on all targets in Makefile. This
|
||||
project was conceived to produce programmable completion routines for the
|
||||
most common Linux/UNIX commands, reducing the amount of typing sysadmins and
|
||||
programmers need to do on a daily basis.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user