summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Birchinger <joker@gentoo.org>2004-06-12 14:06:48 +0000
committerChristian Birchinger <joker@gentoo.org>2004-06-12 14:06:48 +0000
commitc808f3751ef4feaa41d70d06672295b879e5b4e1 (patch)
tree369448dfddbbf5ad526c4477fffe663286711e34 /app-shells
parentThis package was submitted by Lukasz Strzygowski in bug #35943 (diff)
downloadhistorical-c808f3751ef4feaa41d70d06672295b879e5b4e1.tar.gz
historical-c808f3751ef4feaa41d70d06672295b879e5b4e1.tar.bz2
historical-c808f3751ef4feaa41d70d06672295b879e5b4e1.zip
Removed old versions
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash-completion/Manifest9
-rw-r--r--app-shells/bash-completion/bash-completion-20040331-r1.ebuild66
-rw-r--r--app-shells/bash-completion/files/digest-bash-completion-20040331-r11
-rw-r--r--app-shells/bash-completion/files/gentoo.completion-20040331-r1601
4 files changed, 3 insertions, 674 deletions
diff --git a/app-shells/bash-completion/Manifest b/app-shells/bash-completion/Manifest
index c5d17e29228d..652003cecf9c 100644
--- a/app-shells/bash-completion/Manifest
+++ b/app-shells/bash-completion/Manifest
@@ -1,9 +1,6 @@
-MD5 88a2d2957014838be6179e62433e6570 ChangeLog 8821
-MD5 e4a786b1b281556a286f255b06ffe3e1 bash-completion-20040526.ebuild 1923
-MD5 aa0a6f55a46705550c2665e23419c4b6 bash-completion-20040331-r1.ebuild 1926
+MD5 dc18846e242e60ac44c0bb07eb41fe80 ChangeLog 8820
+MD5 47faff760dba8d019207b31c26ff8d02 bash-completion-20040526.ebuild 1922
MD5 1dc8e7503e7e350f3382d37b612178cc metadata.xml 1023
-MD5 38a707ba9274991e61239ce569e840ff files/bash-completion 623
+MD5 a49b867e065849fd3f6ad2c9073d5d8f files/bash-completion 622
MD5 1c828ed53387932b8ed971aafa179875 files/digest-bash-completion-20040526 76
MD5 cf2b91fb90ddc3966177f3c31ff9fe16 files/gentoo.completion-20040526 16031
-MD5 1cf6a7e6383de86d87c79376ccc1dc5d files/digest-bash-completion-20040331-r1 76
-MD5 a4a1a7d1a3af81a16b21e35093de0481 files/gentoo.completion-20040331-r1 16030
diff --git a/app-shells/bash-completion/bash-completion-20040331-r1.ebuild b/app-shells/bash-completion/bash-completion-20040331-r1.ebuild
deleted file mode 100644
index 5d115cd018c4..000000000000
--- a/app-shells/bash-completion/bash-completion-20040331-r1.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2004 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-20040331-r1.ebuild,v 1.3 2004/05/30 05:59:43 mr_bones_ Exp $
-
-S=${WORKDIR}/${PN/-/_}
-DESCRIPTION="Programmable Completion for bash (includes emerge and ebuild commands)."
-HOMEPAGE="http://www.caliban.org/bash/index.shtml#completion"
-SRC_URI="http://www.caliban.org/files/bash/${P}.tar.bz2"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="x86 ppc sparc alpha mips hppa amd64 s390"
-
-DEPEND="app-arch/tar
- app-arch/bzip2"
-
-RDEPEND=">=app-shells/bash-2.05a"
-
-src_install() {
- insinto /etc
- doins bash_completion
-
- insinto /usr/share/bash-completion
- doins contrib/*
-
- insinto /etc/bash_completion.d
- newins ${FILESDIR}/gentoo.completion-${PVR/-r0/} gentoo
-
- insinto /etc/profile.d
- doins ${FILESDIR}/bash-completion
-
- dodoc Changelog README
-}
-
-pkg_postinst() {
- echo
- einfo "Add the following line to your ~/.bashrc to"
- einfo "activate completion support in your bash:"
- einfo "[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion"
- einfo
- einfo "Additional complete functions can be enabled by symlinking them from"
- einfo "/usr/share/bash-completion to /etc/bash_completion.d"
-
- if [ -f /etc/bash_completion.d/gentoo.completion ]
- then
- echo
- ewarn "The file 'gentoo.completion' in '/etc/bash_completion.d/' has been"
- ewarn "replaced with 'gentoo'. Remove gentoo.completion to avoid problems."
- fi
-
- for bcfile in /etc/bash_completion.d/{unrar,harbour,isql,larch,lilypond,p4,ri}
- do
-
- [ -f "${bcfile}" -a ! -L "${bcfile}" ] && moved="${bcfile##*/} ${moved}"
- done
-
- if [ -n "${moved}" ]
- then
- echo
- ewarn "The contrib files: ${moved}"
- ewarn "have been moved to /usr/share/bash-completion. Please DELETE"
- ewarn "those old files in /etc/bash_completion.d and create symlinks."
- fi
- unset bcfile moved
- echo
-}
diff --git a/app-shells/bash-completion/files/digest-bash-completion-20040331-r1 b/app-shells/bash-completion/files/digest-bash-completion-20040331-r1
deleted file mode 100644
index c0891f0adc17..000000000000
--- a/app-shells/bash-completion/files/digest-bash-completion-20040331-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 0150cfba28bdb6e8c4af3edf499bb5d6 bash-completion-20040331.tar.bz2 80291
diff --git a/app-shells/bash-completion/files/gentoo.completion-20040331-r1 b/app-shells/bash-completion/files/gentoo.completion-20040331-r1
deleted file mode 100644
index ab1bf61b60a6..000000000000
--- a/app-shells/bash-completion/files/gentoo.completion-20040331-r1
+++ /dev/null
@@ -1,601 +0,0 @@
-# -*- shell-script -*-
-#
-# Gentoo Linux command completion.
-#
-# Copyright 1999-2002 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-#
-# Author: Geert Bevin <gbevin@theleaf.be>
-# Author: Zach Forrest <zach@disinformation.ca>
-#
-
-#
-# rc & rc-status completion command
-#
-_rc()
-{
- local cur
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- if [ ${#COMP_WORDS[*]} -le 2 ]; then
- COMPREPLY=( $( compgen -W "$(for i in /etc/runlevels/*; do echo ${i##*/}; done)" -- $cur ) )
-
- fi
- return 0
-}
-complete -F _rc rc
-
-_rcstatus()
-{
- local cur opts
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- if [ ${#COMP_WORDS[*]} -le 2 ]; then
- opts="-a -all -l --list -u --unused"
- COMPREPLY=( $( compgen -W "${opts} $(for i in /etc/runlevels/*; do echo ${i##*/}; done)" -- $cur ) )
-
- fi
- return 0
-}
-complete -F _rcstatus rc-status
-
-#
-# distcc-config completion command
-#
-_distccconfig()
-{
- local cur curword numwords opts
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- numwords=${#COMP_WORDS[*]}
- curword=${COMP_CWORD}
- if [ ${numwords} -gt 3 ]; then
- return 0
- fi
- if [[ "${cur}" == -* ]] || [ ${curword} -eq 1 ]; then
- if [ ${numwords} -le 2 ] && [ ${curword} -eq 1 ]; then
- opts="--get-hosts \
- --get-verbose \
- --get-log \
- --set-hosts \
- --set-verbose \
- --set-log \
- --add-path \
- --no-path"
- else
- opts=""
- fi
- else
- opts=""
- fi
- COMPREPLY=($(compgen -W "${opts}" | grep ^$cur))
- return 0
-}
-complete -F _distccconfig distcc-config
-
-#
-# simple completion for Gentoo style init
-#
-complete -W "start stop restart pause zap ineed needsme iuse usesme broken" \
- $(for i in /etc/init.d/*; do echo ${i##*/}; done)
-
-#
-# emerge completion command
-#
-_emerge()
-{
- local cur prev grepcmd sedcmd systemactions setsma setbig portagedir origdir
- local mode words opts curword numwords pkgdbdir
-
- origdir="${PWD}"
- portagedir=/usr/portage
- pkgdbdir=/var/db/pkg
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
- words="${COMP_WORDS[*]}"
- numwords=${#COMP_WORDS[*]}
- curword=${COMP_CWORD}
- mode='ALL'
-
- # Determine which mode we're running in.
-
- if [ ${curword} -eq 1 ] && [ ${numwords} -eq 2 ]; then
- # This is set when we nothing but the command name has been given.
- mode='ALL'
- elif [[ " ${words} " == *" --unmerge "* ]]; then
- mode='UNMERGE'
- elif [[ " ${words} " == *" --safe "* ]]; then
- mode='SAFE'
- elif [[ " ${words} " == *" --search "* ]]; then
- mode='SEARCH'
- elif [[ " ${words} " == *" --world "* ]]; then
- mode='WORLD'
- elif [[ " ${words} " == *" --help "* ]]; then
- mode='HELP'
- elif [[ " ${words} " == *" --clean "* ]]; then
- mode='CLEAN'
- elif [[ " ${words} " == *" --pretend "* ]]; then
- mode='PRETEND'
- else
- # All except '--clean'
- mode='NOCLEAN'
- fi
-
- if [[ "${cur}" == -* ]]; then
-
- # Process Options
-
- case "${mode}" in
- "ALL")
- opts='--clean --help --verbose --debug --fetchonly \
- --onlydeps --noreplace --usepkg --buildpkg \
- --autoclean --pretend --unmerge --safe \
- --search --world'
- ;;
-
- "UNMERGE")
- opts='--clean --verbose --debug --pretend \
- --unmerge --safe'
- ;;
-
- "SAFE")
- opts='--unmerge --verbose --debug'
- ;;
-
- "SEARCH")
- opts='--verbose --debug'
- ;;
-
- "WORLD")
- opts='--verbose --debug --pretend --world'
- ;;
-
- "HELP")
- opts=''
- ;;
-
- "CLEAN")
- opts='--verbose --debug --clean'
- ;;
-
- "PRETEND")
- opts='--verbose --debug --fetchonly --onlydeps \
- --noreplace --usepkg --buildpkg \
- --autoclean --pretend --unmerge --safe \
- --world'
- ;;
-
- "NOCLEAN")
- opts='--help --verbose --debug --fetchonly \
- --onlydeps --noreplace --usepkg --buildpkg \
- --autoclean --pretend --unmerge --safe \
- --search --world'
- ;;
- *)
- # Same as ALL
- opts='--clean --help --verbose --debug --fetchonly \
- --onlydeps --noreplace --usepkg --buildpkg \
- --autoclean --pretend --unmerge --safe \
- --search --world'
- ;;
-
- esac
-
- # Generate the reply.
- COMPREPLY=($(compgen -W "${opts}" | grep ^$cur))
-
- elif [ "${mode}" == "CLEAN" ]; then
- # "rsync" is the only option that can follow "--clean"
- COMPREPLY=($(compgen -W 'rsync'))
-
- elif [ "${mode}" == "WORLD" ]; then
- # "update" is the only option that can follow "--world"
- #COMPREPLY=($(compgen -W 'update'))
- COMPREPLY=($(compgen -W 'update' | grep ^${cur}))
-
- elif [ "${mode}" == "HELP" ]; then
- if [[ ! " ${words} " == *" "@(system|rsync)" "* ]]; then
- COMPREPLY=($(compgen -W 'rsync system' | grep ^${cur}))
- else
- COMPREPLY=''
- fi
-
- elif [ "${mode}" == "SEARCH" ]; then
- # We don't need to interfere here as the search string is a
- # regular expression. (But wouldn't intelligent, dynamic,
- # commandline completion of regular expressions be great!)
- COMPREPLY=''
-
- elif [ "${mode}" == "UNMERGE" ]; then
- # Ignore >, >=, <, <=, and = for the purpose of completion.
- sedcmd="sed -e s:=:: -e s:>:: -e s:<::"
- cur=$(echo "${cur}" | ${sedcmd})
-
- # If the current completion (minus conditional characters)
- # starts with one of the following characters, then complete
- # on filenames (i.e. an ebuild file) rather than referencing
- # the package database.
- if [[ "${cur} " == @('/'|'.'|'~'|'$')* ]]; then
- # Setting this to nothing with tell bash to use default
- # completion (i.e. pathname completion).
- COMPREPLY=''
- else
- cd "${pkgdbdir}"
- grepcmd="grep -E ^$cur.*"
-
- if [ "${cur}" ]; then
- if [ $(echo "${cur}" | grep '/') ]; then
- setbig=$(compgen -G "${cur}*")
- COMPREPLY=($(echo "${setbig}" | ${grepcmd}))
- else
- setsma=$(compgen -S '/' -G "${cur}*")
- if [ $(echo "${setsma}" | ${grepcmd} | grep '/' | wc -l) = 1 ]; then
- setbig=$(compgen -G "*/*")
- COMPREPLY=($(echo "${setbig}" | ${grepcmd}))
- else
- COMPREPLY=($(echo "${setsma}" | ${grepcmd}))
- fi
- fi
- else
- setsma=$(compgen -S '/' -G "${cur}*")
- COMPREPLY=($(echo "${setsma}"))
- fi
-
- cd "${origdir}"
- fi
-
- elif [ "${mode}" == "SAFE" ]; then
- COMPREPLY=($(compgen -W '--unmerge' | grep ^${cur}))
-
- elif [[ " ${words} " == *" "@(update|system|rsync)" "* ]]; then
- # syncing the portage tree is a lonely job
- # updating should be done by itself (also lonely)
- COMPREPLY=''
-
- elif [[ " ${words} " == *" --usepkg "* ]] && [[ "${cur} " == @('/'|'.'|'~'|'$')* ]]; then
- # In order to complete on a package file, the name must be
- # an absolute or realative pathname (even if it is in the
- # current directory). This allows completion on both package
- # names in /usr/portage and on arbitrary *.tbz2 packages.
- #
- # I'm planning to come up with a more elegant solution, but
- # that will have to wait for another update. (The only thing
- # that is really annoying right now is when specifying a
- # *.tbz2 file in or below the current directory, you have
- # to prefix the path with "./".)
- COMPREPLY=''
-
- else
- cd "${portagedir}"
- grepcmd="grep -E ^${cur}.*"
- sedcmd="sed -e /^[^-]*$/d"
-
- if [ ${COMP_CWORD} -eq 1 ]; then
- # If emerge hasn't been given any args yet, include "rsync"
- # among the system actions. The case where the "--clean" flag
- # has been specified is handled above.
- systemactions=$'\n'"system"$'\n'"update"$'\n'"rsync"
- else
- # Only allow these actions if no packages have been specified.
- if [[ ! " ${words} " == *" "*[/]*" "* ]]; then
- systemactions=$'\n'"system"$'\n'"update"
- else
- systemactions=''
- fi
- fi
-
- if [ "${cur}" ]; then
- if [[ "${cur} " == @('/'|'.'|'~'|'$')* ]]; then
- COMPREPLY=''
- elif [ $(echo "${cur}" | grep '/') ]; then
- setbig=$(compgen -G "${cur}*" | ${sedcmd})"${systemactions}"
- COMPREPLY=($(echo "${setbig}" | $grepcmd))
- else
- setsma=$(compgen -S '/' -G "${cur}*" | ${sedcmd})"${systemactions}"
- if [ $(echo "${setsma}" | ${grepcmd} | grep '/' | wc -l) = 1 ]; then
- setbig=$(compgen -G "*/*" | ${sedcmd})"${systemactions}"
- COMPREPLY=($(echo "${setbig}" | ${grepcmd}))
- else
- COMPREPLY=($(echo "${setsma}" | ${grepcmd}))
- fi
- fi
- else
- setsma=$(compgen -S '/' -G "${cur}*" | ${sedcmd})"${systemactions}"
- COMPREPLY=($(echo "${setsma}"))
- fi
-
- cd "${origdir}"
- fi
-
- # (Adapted from bash_completion by Ian Macdonald <ian@caliban.org>)
- # This removes any options from the list of completions that have
- # already been specified on the command line.
- COMPREPLY=($(echo "${COMP_WORDS[@]}" | \
- (while read -d ' ' i; do
- [ "${i}" == "" ] && continue
- # flatten array with spaces on either side,
- # otherwise we cannot grep on word boundaries of
- # first and last word
- COMPREPLY=" ${COMPREPLY[@]} "
- # remove word from list of completions
- COMPREPLY=(${COMPREPLY/ ${i%% *} / })
- done
- echo ${COMPREPLY[@]})))
-
- return 0
-}
-complete -o default -F _emerge emerge
-
-#
-# ebuild completion command
-#
-_ebuild()
-{
- local cur prev
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- prev=${COMP_WORDS[COMP_CWORD-1]}
- if [ $COMP_CWORD -eq 1 ]; then
- #COMPREPLY=( $( compgen -o filenames -X '!*.ebuild' $cur ) )
- COMPREPLY=($(compgen -o filenames))
- elif [ $COMP_CWORD -eq 2 ]; then
- COMPREPLY=( $( compgen -W 'check \
- clean compile config \
- depend digest \
- fetch \
- help \
- install \
- merge \
- package postinst postrm preinst prerm \
- qmerge \
- rcheck remerge rpm \
- setup \
- touch \
- unmerge unpack' $cur ) )
- fi
- return 0
-}
-complete -o default -F _ebuild ebuild
-
-#
-# rc-update completion command
-#
-_rcupdate()
-{
- local cur prev initdir runlvdir origdir
- origdir=${PWD}
- initdir=/etc/init.d
- runlvdir=/etc/runlevels
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- prev=${COMP_WORDS[COMP_CWORD-1]}
- if [ $COMP_CWORD -eq 1 ]; then
- COMPREPLY=( $( compgen -W 'add del' ${cur} ) )
- elif [ $COMP_CWORD -eq 2 ]; then
- cd ${initdir}
- COMPREPLY=( $( compgen -G "${cur}*" ) )
- cd ${origdir}
- elif [ $COMP_CWORD -eq 3 ]; then
- cd ${runlvdir}
- COMPREPLY=( $( compgen -G "${cur}*" ) )
- cd ${origdir}
- fi
- return 0
-}
-complete -F _rcupdate rc-update
-
-#
-# gcc-config completion command
-#
-_gccconfig()
-{
- local cur curword numwords opts
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- numwords=${#COMP_WORDS[*]}
- curword=${COMP_CWORD}
- if [ ${numwords} -gt 3 ]; then
- return 0
- fi
- if [[ "${cur}" == -* ]] || [ ${curword} -eq 1 ]; then
- if [ ${numwords} -le 2 ] && [ ${curword} -eq 1 ]; then
- opts="--use-old \
- --use-portage-chost \
- --get-current-profile \
- --list-profiles \
- --print-environ \
- --get-bin-path \
- --get-lib-path \
- --get-stdcxx-incdir"
- else
- opts=""
- fi
- elif [ ${numwords} -le 3 ] && [ ${curword} -eq 2 ]; then
- case "${COMP_WORDS[1]}" in
- "--print-environ"|"--get-bin-path"|"--get-lib-path"|"--get-stdcxx-incdir")
- opts=$(gcc-config --list-profiles)
- ;;
- *)
- opts=""
- ;;
- esac
- else
- opts=""
- fi
- COMPREPLY=($(compgen -W "${opts}" | grep ^$cur))
- return 0
-}
-complete -F _gccconfig gcc-config
-
-_javaconfig()
-{
- local cur curword numwords opts args arg spec flag sedcmd grepcmd
- local multiplepkgs pkgs execopts
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- numwords=${#COMP_WORDS[*]}
- curword=${COMP_CWORD}
- opts=""
- args=""
- pkgs=""
- sedcmd="sed -r -e s/\[([^]]+)\].*/\1/"
- vmsedcmd="sed -r -e s/\[([^]]+)\]/\1/"
- grepcmd="egrep -o (--set-(system|user)-(classpath|vm)=)"
- multiplepkgs=""
- execopts="HtmlConverter JavaPluginControlPanel \
- appletviewer awt_robot \
- extcheck \
- idlj \
- j2sdk-config jar jarsigner \
- java java-rmi.cgijava_vm javac javadoc javah javap jdb \
- keytool kinit klist ktab \
- native2ascii \
- oldjava oldjavac oldjdb orbd \
- policytool \
- realpath rmic rmid rmiregistry \
- serialver servertool \
- tnameserv"
- if [[ "${cur}" == -* ]] || [ ${curword} -eq 1 ]; then
- case "${cur}" in
- "--java")
- opts="--java --javac --java-version"
- ;;
- --j@(a@(r|va@(c|-version))|@(dk|re)-home))
- opts=""
- ;;
- --list-available-@(packages|vms))
- opts=""
- ;;
- --@(exec|set-@(user|system)-@(classpath|vm)))
- opts="${cur}="
- ;;
- --set-@(user|system)-@(classpath|vm)=)
- if [[ "${cur}" == "--set-system-vm=" ]] || [[ "${cur}" == "--set-user-vm=" ]]; then
- flag="--list-available-vms"
- args=$(java-config "${flag}" | cut --delimiter=' ' --fields=2 | ${vmsedcmd})
- else
- flag="--list-available-packages"
- args=$(java-config "${flag}" | ${sedcmd})
- fi
- #echo "$(java-config ${flag})" >> output
- #args=$(java-config "${flag}" | ${sedcmd})
- for arg in ${args}
- do
- [ "${opts}" ] && opts="${opts} ${arg}" || opts="${arg}"
- done
- COMPREPLY=($(compgen $nospace -W "${opts}"))
- return 0
- ;;
- "--exec=")
- COMPREPLY=($(compgen $nospace -W "${execopts}"))
- return 0
- ;;
- *)
- if [[ "${cur}" == "--set-system-vm="* ]] || [[ "${cur}" == "--set-user-vm="* ]]; then
- args=$(java-config --list-available-vms | cut --delimiter=' ' --fields=2 | ${vmsedcmd})
- # spec=$(echo "${cur}" | egrep -o "(--set-(system|user)-(classpath|vm)=)")
- # spec=$(echo "${cur}" | ${grepcmd})
- if [[ "${cur}" == "--set-system-vm="* ]]; then
- spec=${cur##--set-system-vm=}
- else
- spec=${cur##--set-user-vm=}
- fi
- for arg in ${args}
- do
- if [[ "${arg:0:${#spec}}" == "${spec}" ]]; then
- [ "${opts}" ] && opts="${opts} ${arg}" || opts="${arg}"
- fi
- done
- [[ "${opts}" == "${spec}" ]] && opts=""
- COMPREPLY=($(compgen -W "${opts}"))
- return 0
- elif [[ "${cur}" == "--set-system-classpath="* ]] || [[ "${cur}" == "--set-user-classpath="* ]]; then
- args=$(java-config --list-available-packages | ${sedcmd})
- [ $(echo "${cur}" | grep -c ",") -gt 0 ] && multiplepkgs="true"
- # spec=$(echo "${cur}" | ${grepcmd})
- if [[ "${cur}" == "--set-system-classpath="* ]]; then
- spec="${cur##--set-system-classpath=}"
- else
- spec="${cur##--set-user-classpath=}"
- fi
- if [[ "${multiplepkgs}" ]]; then
- pkgs="${spec%,*}"
- spec="${spec##*,}"
- fi
- if [[ "${multiplepkgs}" ]]; then
- for arg in ${args}
- do
- if [[ "${spec}" ]]; then
- if [[ "${arg:0:${#spec}}" == "${spec}" ]] \
- && [[ ! $(echo "${cur}" | egrep -o "(=|,)${arg},") ]]; then
- [ "${opts}" ] && opts="${opts} ${pkgs},${arg}" || opts="${pkgs},${arg}"
- fi
- else
- if [[ ! $(echo "${cur}" | egrep -o "(=|,)${arg},") ]]; then
- [ "${opts}" ] && opts="${opts} ${pkgs},${arg}" || opts="${pkgs},${arg}"
- fi
- fi
- done
- [[ "${opts}" == "${pkgs},${spec}" ]] && opts=""
- else
- for arg in ${args}
- do
- if [[ "${spec}" ]] && [[ "${arg:0:${#spec}}" == "${spec}" ]]; then
- [ "${opts}" ] && opts="${opts} ${arg}" || opts="${arg}"
- fi
- done
- [[ "${opts}" == "${spec}" ]] && opts=""
- fi
- COMPREPLY=($(compgen -W "${opts}"))
- return 0
- elif [[ "${cur}" == "--exec="* ]]; then
- spec=${cur##--exec=}
- for arg in ${execopts}
- do
- if [[ "${arg:0:${#spec}}" == "${spec}" ]]; then
- [ "${opts}" ] && opts="${opts} ${arg}" || opts="${arg}"
- fi
- done
- [[ "${opts}" == "${spec}" ]] && opts=""
- COMPREPLY=($(compgen -W "${opts}"))
- return 0
- else
- opts="--javac \
- --java \
- --jar \
- --jdk-home \
- --jre-home \
- --java-version \
- --classpath \
- --full-classpath \
- --exec \
- --list-available-packages \
- --list-available-vms \
- --set-system-vm \
- --set-user-vm \
- --set-system-classpath \
- --set-user-classpath \
- --clean-system-classpath"
- fi
- ;;
- esac
- else
- opts=""
- fi
- COMPREPLY=($(compgen $nospace -W "${opts}" | grep ^${cur}))
- return 0
-}
-complete $nospace -F _javaconfig java-config
-
-_openglupdate()
-{
- local cur
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- if [ ${#COMP_WORDS[*]} -le 2 ]; then
- COMPREPLY=($(compgen -W "$(for i in /usr/lib/opengl/*; do [ -d "$i" ] && echo ${i##*/}; done)" $cur))
- fi
- return 0
-}
-complete -F _openglupdate opengl-update