[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 1e4bcaf0c6052449fda9750d4865a275a87f4336 Author: Sam James gentoo org> AuthorDate: Sun Feb 25 20:14:47 2024 + Commit: Sam James gentoo org> CommitDate: Sun Feb 25 20:14:47 2024 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=1e4bcaf0 completions/emerge: fix indentation Signed-off-by: Sam James gentoo.org> completions/emerge | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/completions/emerge b/completions/emerge index c3be06b..98110c4 100644 --- a/completions/emerge +++ b/completions/emerge @@ -98,20 +98,20 @@ _emerge() --autounmask-backtrack --autounmask-only --autounmask-unrestricted-atoms \ --autounmask-keep-masks --autounmask-license --autounmask-use \ --accept-properties --accept-restrict --alert --alert=y --alert=n \ - --ask-enter-invalid \ - --binpkg-changed-deps --binpkg-respect-use \ - --buildpkg-exclude \ +--ask-enter-invalid \ +--binpkg-changed-deps --binpkg-respect-use \ +--buildpkg-exclude \ --buildpkg --buildpkgonly \ - --backtrack= \ +--backtrack= \ --changelog --clean --color=y --color=n --columns --complete-graph --config \ - --complete-graph-if-new-use --complete-graph-if-new-ver \ - --config-root \ +--complete-graph-if-new-use --complete-graph-if-new-ver \ +--config-root \ --changed-deps --changed-deps-report --changed-slot --changed-use \ --debug --deep --depclean --deselect \ - --depclean-lib-check \ - --dynamic-deps --dynamic-deps=y --dynamic-deps=n \ +--depclean-lib-check \ +--dynamic-deps --dynamic-deps=y --dynamic-deps=n \ --emptytree \ - --exclude \ +--exclude \ --fetch-all-uri --fetchonly \ --getbinpkg --getbinpkgonly \ --ignore-default-opts --info \
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 5a9c389ddbf6e1e1692d521f7e132110ec58d482 Author: Sam James gentoo org> AuthorDate: Wed Feb 21 07:25:23 2024 + Commit: Sam James gentoo org> CommitDate: Wed Feb 21 07:25:23 2024 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=5a9c389d completions/emerge: add --with-test-deps Signed-off-by: Sam James gentoo.org> completions/emerge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/emerge b/completions/emerge index 915a0b0..e813817 100644 --- a/completions/emerge +++ b/completions/emerge @@ -114,7 +114,7 @@ _emerge() --tree \ --unmerge --update --update-if-installed --upgradeonly --usepkg --usepkgonly \ --verbose --verbose-conflicts \ ---with-bdeps=y --with-bdeps=n" +--with-bdeps=y --with-bdeps=n --with-test-deps" if [[ ${curword} -eq 1 ]] && [[ ${numwords} -eq 2 ]] ; then opts="${opts} --help --resume --searchdesc --version" fi
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 01bd80421d77d8e538495aafffef34c23ef3cd6d Author: Sam James gentoo org> AuthorDate: Wed Feb 21 07:29:23 2024 + Commit: Sam James gentoo org> CommitDate: Wed Feb 21 07:29:23 2024 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=01bd8042 completions/emerge: add --changed-* options * --changed-deps * --changed-deps-report * --changed-slot * --changed-use Signed-off-by: Sam James gentoo.org> completions/emerge | 1 + 1 file changed, 1 insertion(+) diff --git a/completions/emerge b/completions/emerge index e813817..442acaf 100644 --- a/completions/emerge +++ b/completions/emerge @@ -96,6 +96,7 @@ _emerge() --ask --autounmask-write --autounmask-keep-keywords --autounmask-continue \ --buildpkg --buildpkgonly \ --changelog --clean --color=y --color=n --columns --complete-graph --config \ +--changed-deps --changed-deps-report --changed-slot --changed-use \ --debug --deep --depclean --deselect \ --emptytree \ --fetch-all-uri --fetchonly \
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 6a3d1b3d78a174db6711deb8335ab998ec6bb6c5 Author: Sam James gentoo org> AuthorDate: Wed Feb 21 07:34:19 2024 + Commit: Sam James gentoo org> CommitDate: Wed Feb 21 07:34:19 2024 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=6a3d1b3d completions/emerge: add various further options Signed-off-by: Sam James gentoo.org> completions/emerge | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/completions/emerge b/completions/emerge index 442acaf..c3be06b 100644 --- a/completions/emerge +++ b/completions/emerge @@ -93,12 +93,25 @@ _emerge() elif [[ ${cur} == --* ]]; then # Complete on long options. opts="--alphabetical \ ---ask --autounmask-write --autounmask-keep-keywords --autounmask-continue \ +--ask \ +--autounmask-write --autounmask-keep-keywords --autounmask-continue \ +--autounmask-backtrack --autounmask-only --autounmask-unrestricted-atoms \ +--autounmask-keep-masks --autounmask-license --autounmask-use \ +--accept-properties --accept-restrict --alert --alert=y --alert=n \ + --ask-enter-invalid \ + --binpkg-changed-deps --binpkg-respect-use \ + --buildpkg-exclude \ --buildpkg --buildpkgonly \ + --backtrack= \ --changelog --clean --color=y --color=n --columns --complete-graph --config \ + --complete-graph-if-new-use --complete-graph-if-new-ver \ + --config-root \ --changed-deps --changed-deps-report --changed-slot --changed-use \ --debug --deep --depclean --deselect \ + --depclean-lib-check \ + --dynamic-deps --dynamic-deps=y --dynamic-deps=n \ --emptytree \ + --exclude \ --fetch-all-uri --fetchonly \ --getbinpkg --getbinpkgonly \ --ignore-default-opts --info \
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 1f3b30d5e4d5b39601fb403db492c2f844960975 Author: Sam James gentoo org> AuthorDate: Wed Feb 21 07:23:35 2024 + Commit: Sam James gentoo org> CommitDate: Wed Feb 21 07:23:35 2024 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=1f3b30d5 completions/emerge: add --verbose-conflicts Bug: https://bugs.gentoo.org/924830 Signed-off-by: Sam James gentoo.org> completions/emerge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/emerge b/completions/emerge index 113aa07..915a0b0 100644 --- a/completions/emerge +++ b/completions/emerge @@ -113,7 +113,7 @@ _emerge() --sync \ --tree \ --unmerge --update --update-if-installed --upgradeonly --usepkg --usepkgonly \ ---verbose \ +--verbose --verbose-conflicts \ --with-bdeps=y --with-bdeps=n" if [[ ${curword} -eq 1 ]] && [[ ${numwords} -eq 2 ]] ; then opts="${opts} --help --resume --searchdesc --version"
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 8e15ae348f400c86a8314933a15d8f851f045281 Author: Sam James gentoo org> AuthorDate: Mon Mar 13 21:26:42 2023 + Commit: Sam James gentoo org> CommitDate: Mon Mar 13 21:27:22 2023 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=8e15ae34 completions/emerge: add additional options Adds the following: - --autounmask-keep-keywords - --autounmask-continue - --onlydeps-with-ideps - --onlydeps-with-rdeps - --update-if-installed Signed-off-by: Sam James gentoo.org> completions/emerge | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/completions/emerge b/completions/emerge index e84a7fc..113aa07 100644 --- a/completions/emerge +++ b/completions/emerge @@ -93,7 +93,7 @@ _emerge() elif [[ ${cur} == --* ]]; then # Complete on long options. opts="--alphabetical \ ---ask --autounmask-write \ +--ask --autounmask-write --autounmask-keep-keywords --autounmask-continue \ --buildpkg --buildpkgonly \ --changelog --clean --color=y --color=n --columns --complete-graph --config \ --debug --deep --depclean --deselect \ @@ -105,14 +105,14 @@ _emerge() --keep-going \ --metadata \ --newuse --noconfmem --nodeps --noreplace --nospinner \ ---oneshot --onlydeps \ +--oneshot --onlydeps --onlydeps-with-ideps --onlydeps-with-rdeps \ --pretend --prune \ --quiet --rage-clean \ --reinstall=changed-use --regen \ --search \ --sync \ --tree \ ---unmerge --update --upgradeonly --usepkg --usepkgonly \ +--unmerge --update --update-if-installed --upgradeonly --usepkg --usepkgonly \ --verbose \ --with-bdeps=y --with-bdeps=n" if [[ ${curword} -eq 1 ]] && [[ ${numwords} -eq 2 ]] ; then
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: a7513c33fc3744c7664c8c6c9c3c1bb22f0b0ab9 Author: Louis Sautier gmail com> AuthorDate: Sat Nov 5 23:16:06 2022 + Commit: Sam James gentoo org> CommitDate: Sat Jan 14 16:38:46 2023 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=a7513c33 emerge: add support for --deselect Signed-off-by: Louis Sautier gmail.com> Closes: https://github.com/gentoo/gentoo-bashcomp/pull/6 Signed-off-by: Sam James gentoo.org> completions/emerge | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions/emerge b/completions/emerge index 03cc503..e84a7fc 100644 --- a/completions/emerge +++ b/completions/emerge @@ -35,7 +35,7 @@ _emerge() # find action for x in ${COMP_LINE} ; do if [[ ${x} =~ ^(system|world)$ ]] || [[ ${x} =~ -[CPcs] ]] || \ -[[ ${x} =~ --(clean|config|depclean|info|metadata|prune|rage-clean|regen|resume|search|sync|unmerge) ]] +[[ ${x} =~ --(clean|config|depclean|deselect|info|metadata|prune|rage-clean|regen|resume|search|sync|unmerge) ]] then action=${x} break @@ -96,7 +96,7 @@ _emerge() --ask --autounmask-write \ --buildpkg --buildpkgonly \ --changelog --clean --color=y --color=n --columns --complete-graph --config \ ---debug --deep --depclean \ +--debug --deep --depclean --deselect \ --emptytree \ --fetch-all-uri --fetchonly \ --getbinpkg --getbinpkgonly \
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 48adce4356f46eda30265d2c5a6cb4055c16c5e3 Author: Louis Sautier gmail com> AuthorDate: Sun Jun 10 16:26:46 2018 + Commit: Patrice Clement gentoo org> CommitDate: Sat Jun 23 22:23:00 2018 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=48adce43 emerge: add support for sets completion. Based on Marco Genasci's patch and slightly modified to get rid of the unnecessary call to xargs. Courtesy of Marco Genasci gmail.com>. Closes: https://bugs.gentoo.org/235454 Closes: https://github.com/gentoo/gentoo-bashcomp/pull/4 completions/emerge | 6 ++ 1 file changed, 6 insertions(+) diff --git a/completions/emerge b/completions/emerge index d7da227..03cc503 100644 --- a/completions/emerge +++ b/completions/emerge @@ -26,6 +26,12 @@ _emerge() return 0 fi +if [[ ${cur} =~ ^@ ]] ; then +local SET_LIST=($(emerge --list-sets)) +COMPREPLY=($(compgen -W '${SET_LIST[@]/#/@}' ${cur})) +return 0 +fi + # find action for x in ${COMP_LINE} ; do if [[ ${x} =~ ^(system|world)$ ]] || [[ ${x} =~ -[CPcs] ]] || \
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 41d0608e51e5fe3b5034de9ae3700c2490380e2e Author: William Hubbs gentoo org> AuthorDate: Fri Mar 2 18:33:51 2018 + Commit: William Hubbs gentoo org> CommitDate: Fri Mar 2 18:35:09 2018 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=41d0608e Remove OpenRC completions since they are provided upstream completions/rc | 21 -- completions/rc-service | 111 - completions/rc-status | 28 - completions/rc-update | 40 -- 4 files changed, 200 deletions(-) diff --git a/completions/rc b/completions/rc deleted file mode 100644 index 7453ed4..000 --- a/completions/rc +++ /dev/null @@ -1,21 +0,0 @@ -# Gentoo Linux Bash Shell Command Completion -# -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later - -# -# rc completion command -# -_rc() -{ -local cur -COMPREPLY=() -cur="${COMP_WORDS[COMP_CWORD]}" -if [[ ${#COMP_WORDS[*]} -le 2 ]]; then -COMPREPLY=($(compgen -W "$(for i in @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/*; do echo ${i##*/}; done)" -- $cur)) -fi -return 0 -} && -complete -F _rc rc - -# vim: ft=sh:et:ts=4:sw=4:tw=80 diff --git a/completions/rc-service b/completions/rc-service deleted file mode 100644 index 9ad2ce1..000 --- a/completions/rc-service +++ /dev/null @@ -1,111 +0,0 @@ -# Gentoo Linux Bash Shell Command Completion -# -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later - -source "@helpersdir@/gentoo-common.sh" - -_rc_service() { -local cur prev numwords opts -local words i x filename -local action actionpos -COMPREPLY=() -cur="${COMP_WORDS[COMP_CWORD]}" -prev="${COMP_WORDS[COMP_CWORD-1]}" -numwords=${#COMP_WORDS[*]} - -if [[ ${prev} == '>' || ${prev} == '<' ]] ; then -COMPREPLY=($(compgen -f -- ${cur})) -return 0 -fi - -# find action -for x in ${COMP_LINE} ; do -if [[ ${x} =~ --(list|exists|resolve) ]] || \ -[[ ${x} =~ -(l|e|r) ]] -then -action=${x} -break -fi -done -if [[ -n ${action} ]]; then -for ((i = 0; i < ${numwords}; i++ )); do -if [[ ${COMP_WORDS[${i}]} == "${action}" ]]; then -actionpos=${i} -break -fi -done - -for ((i = 1; i < ${numwords}; i++ )); do -if [[ ! ${COMP_WORDS[$i]} == -* ]]; then -break -fi -done -fi - -if [[ ${COMP_CWORD} -eq 3 ]]; then -return 1 -fi - -# check if an option was typed -if [[ ${cur} == -* ]]; then -if [[ ${cur} == --* ]]; then -opts="--list --exists --resolve" -COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) -return 0 -elif [[ ${cur} == -* ]]; then -opts="-l -e -r" -COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) -return 0 -fi - - -# NOTE: This slows things down! -# (Adapted from bash_completion by Ian Macdonald) -# 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 -[[ -z ${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 -# if no option typed -else -if [[ ${COMP_CWORD} -eq 1 ]]; then # if first word typed -words="`rc-service -l | grep ^${cur}`" # complete for init scripts -COMPREPLY=($(for i in ${words} ; do \ -[[ ${i} == ${cur}* ]] && echo ${i} ; \ -done)) -return 0 -elif [[ ${COMP_CWORD} -eq 2 ]] && [[ ${prev} != -* ]]; then # if second word typed and we didn't type in a function -filename=`rc-service -r ${prev}` -opts=`cat ${filename} | grep "^\w*()" | sed "s/().*$//"`# Greps the functions included in the init script -if [[ "x${opts}" == "x" ]] ; then # if no options found loosen the grep algorhythm -opts=`cat ${filename} | grep "\w*()" | sed "s/().*$//"` -fi -COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) -return 0 -fi -fi -if [[ ${action} == '--exists' ]] || [[ ${action} == '-e' ]] || \ - [[ ${action} == '--resolve' ]] || [[ ${action} == '-r' ]]; then -
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: a5c0c7a1c5610f8040ea1fdb1d0a1f8c4d2f45b3 Author: Louis Sautier gmail com> AuthorDate: Mon Feb 15 00:15:46 2016 + Commit: Michał Górny gentoo org> CommitDate: Fri Mar 2 18:06:51 2018 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=a5c0c7a1 add completion for emerge --rage-clean This PR adds the --rage-clean option. Closes: https://github.com/gentoo/gentoo-bashcomp/pull/2 completions/emerge | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/completions/emerge b/completions/emerge index a7d1f52..d7da227 100644 --- a/completions/emerge +++ b/completions/emerge @@ -29,7 +29,7 @@ _emerge() # find action for x in ${COMP_LINE} ; do if [[ ${x} =~ ^(system|world)$ ]] || [[ ${x} =~ -[CPcs] ]] || \ -[[ ${x} =~ --(clean|config|depclean|info|metadata|prune|regen|resume|search|sync|unmerge) ]] +[[ ${x} =~ --(clean|config|depclean|info|metadata|prune|rage-clean|regen|resume|search|sync|unmerge) ]] then action=${x} break @@ -101,7 +101,7 @@ _emerge() --newuse --noconfmem --nodeps --noreplace --nospinner \ --oneshot --onlydeps \ --pretend --prune \ ---quiet \ +--quiet --rage-clean \ --reinstall=changed-use --regen \ --search \ --sync \ @@ -153,7 +153,7 @@ _emerge() fi # Complete on installed packages when unmerging. -if [[ "${action}" == '--unmerge' ]]; then +if [[ "${action}" =~ --(rage-clean|unmerge) ]]; then if [[ -n "${cur}" ]] ; then if [[ "${cur}" == */* ]]; then words=$(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg; compgen -G "${cur}*")
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 5c9fbe55124aef398e9e23186a1ef83e592a09d4 Author: Louis Sautier gmail com> AuthorDate: Thu Jan 7 10:35:56 2016 + Commit: Michał Górny gentoo org> CommitDate: Fri Mar 2 18:06:45 2018 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=5c9fbe55 Add completion for emerge --autounmask-write Closes: https://github.com/gentoo/gentoo-bashcomp/pull/1 completions/emerge | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/completions/emerge b/completions/emerge index 63c02b4..a7d1f52 100644 --- a/completions/emerge +++ b/completions/emerge @@ -86,7 +86,8 @@ _emerge() fi elif [[ ${cur} == --* ]]; then # Complete on long options. -opts="--alphabetical --ask \ +opts="--alphabetical \ +--ask --autounmask-write \ --buildpkg --buildpkgonly \ --changelog --clean --color=y --color=n --columns --complete-graph --config \ --debug --deep --depclean \
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 1781d5b81021858db447d4c63f68e081e320fd00 Author: Michał Górny gentoo org> AuthorDate: Sun Aug 31 19:18:57 2014 + Commit: Michał Górny gentoo org> CommitDate: Sun Aug 31 19:18:57 2014 + URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=1781d5b8 Split completions by completed command. completions/browser-config | 31 + completions/distcc-config | 41 ++ completions/ebuild | 34 + completions/ekeyword | 46 ++ completions/emerge | 410 +++ completions/epkginfo | 28 + completions/epm| 48 ++ completions/equery | 280 completions/euse | 60 ++ completions/gcc-config | 45 ++ completions/gentoo | 1652 completions/glsa-check | 33 + completions/java-config| 158 + completions/metagen| 30 + completions/portageq | 87 +++ completions/rc | 21 + completions/rc-service | 111 +++ completions/rc-status | 28 + completions/rc-update | 40 ++ completions/revdep-rebuild | 55 ++ completions/splat | 33 + completions/webapp-config | 169 + 22 files changed, 1788 insertions(+), 1652 deletions(-) diff --git a/completions/browser-config b/completions/browser-config new file mode 100644 index 000..158ca42 --- /dev/null +++ b/completions/browser-config @@ -0,0 +1,31 @@ +# Gentoo Linux Bash Shell Command Completion +# +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# +# browser-config completion command +# +_browserconfig() +{ +local cur prev +COMPREPLY=() +cur="${COMP_WORDS[COMP_CWORD]}" +prev="${COMP_WORDS[COMP_CWORD-1]}" +if [[ ${COMP_CWORD} -eq 1 ]]; then +COMPREPLY=($(compgen -W '-b -h -m' -- ${cur})) +elif [[ "${prev}" == "-b" ]]; then +COMPREPLY=($(compgen -W "$(for i in @GENTOO_PORTAGE_EPREFIX@/usr/share/browser-config/*; do [ -f $i ] && echo ${i##*/}; done)" $cur)) +elif [[ "${prev}" == "-m" ]]; then +COMPREPLY=($(compgen -W "same_window new_window new_tab new_browser" -- ${cur})) +if [[ -z "${COMPREPLY}" ]]; then +COMPREPLY='' +fi +else +unset COMPREPLY +fi +return 0 +} && +complete -F _browserconfig browser-config + +# vim: ft=sh:et:ts=4:sw=4:tw=80 diff --git a/completions/distcc-config b/completions/distcc-config new file mode 100644 index 000..41c315f --- /dev/null +++ b/completions/distcc-config @@ -0,0 +1,41 @@ +# Gentoo Linux Bash Shell Command Completion +# +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# +# 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 +unset COMPREPLY +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 + +# vim: ft=sh:et:ts=4:sw=4:tw=80 diff --git a/completions/ebuild b/completions/ebuild new file mode 100644 index 000..cd6e17e --- /dev/null +++ b/completions/ebuild @@ -0,0 +1,34 @@ +# Gentoo Linux Bash Shell Command Completion +# +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# +# ebuild completion command +# +_ebuild() +{ +local cur opts +COMPREPLY=() +cur="${COMP_WORDS[COMP_CWORD]}" + +opts="help setup clean fetch digest manifest unpack compile test preinst \ +install postinst qmerge merge unmerge prerm postrm config package rpm \ +configure prepare" + +if [[ $COMP_CWORD -eq 1 ]] ; then +COMPREPLY=($(compgen -f -X "!*.ebuild" -- ${cur}) \ +$(compgen -d -- ${cur}) \ +$(compgen -W '--debug --force --help --ignore-default-opts --skip-manifest' -- ${cur})) + +elif [[ $COMP_CWORD -eq 2 && "${COMP_WORDS[1]}" = "--debug --force --ignore-default-opts --skip-manifest" ]] ; then +COMPREPLY=($(compgen -f -X "!*.ebuild" -- ${cur}) $(compgen -d -- ${cur})) + +elif [[ $COMP_CWORD -ge 2 ]] ; then +COMPREPLY=($(compgen -W "${opts}" -- ${cur})) +fi +return 0 +} && +complete -o filenames -F _ebuild ebuild + +# vim: ft=sh:et:ts=4:sw=4:tw=80 diff --git a/completions/ekeyword b/completions/ekeyword new file mode 100644 index 000..3bf3006 --- /dev/null +++
[gentoo-commits] proj/gentoo-bashcomp:master commit in: completions/
commit: 1781d5b81021858db447d4c63f68e081e320fd00 Author: Michał Górny mgorny AT gentoo DOT org AuthorDate: Sun Aug 31 19:18:57 2014 + Commit: Michał Górny mgorny AT gentoo DOT org CommitDate: Sun Aug 31 19:18:57 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bashcomp.git;a=commit;h=1781d5b8 Split completions by completed command. --- completions/browser-config | 31 + completions/distcc-config | 41 ++ completions/ebuild | 34 + completions/ekeyword | 46 ++ completions/emerge | 410 +++ completions/epkginfo | 28 + completions/epm| 48 ++ completions/equery | 280 completions/euse | 60 ++ completions/gcc-config | 45 ++ completions/gentoo | 1652 completions/glsa-check | 33 + completions/java-config| 158 + completions/metagen| 30 + completions/portageq | 87 +++ completions/rc | 21 + completions/rc-service | 111 +++ completions/rc-status | 28 + completions/rc-update | 40 ++ completions/revdep-rebuild | 55 ++ completions/splat | 33 + completions/webapp-config | 169 + 22 files changed, 1788 insertions(+), 1652 deletions(-) diff --git a/completions/browser-config b/completions/browser-config new file mode 100644 index 000..158ca42 --- /dev/null +++ b/completions/browser-config @@ -0,0 +1,31 @@ +# Gentoo Linux Bash Shell Command Completion +# +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# +# browser-config completion command +# +_browserconfig() +{ +local cur prev +COMPREPLY=() +cur=${COMP_WORDS[COMP_CWORD]} +prev=${COMP_WORDS[COMP_CWORD-1]} +if [[ ${COMP_CWORD} -eq 1 ]]; then +COMPREPLY=($(compgen -W '-b -h -m' -- ${cur})) +elif [[ ${prev} == -b ]]; then +COMPREPLY=($(compgen -W $(for i in @GENTOO_PORTAGE_EPREFIX@/usr/share/browser-config/*; do [ -f $i ] echo ${i##*/}; done) $cur)) +elif [[ ${prev} == -m ]]; then +COMPREPLY=($(compgen -W same_window new_window new_tab new_browser -- ${cur})) +if [[ -z ${COMPREPLY} ]]; then +COMPREPLY='' +fi +else +unset COMPREPLY +fi +return 0 +} +complete -F _browserconfig browser-config + +# vim: ft=sh:et:ts=4:sw=4:tw=80 diff --git a/completions/distcc-config b/completions/distcc-config new file mode 100644 index 000..41c315f --- /dev/null +++ b/completions/distcc-config @@ -0,0 +1,41 @@ +# Gentoo Linux Bash Shell Command Completion +# +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# +# 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 +unset COMPREPLY +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 + +# vim: ft=sh:et:ts=4:sw=4:tw=80 diff --git a/completions/ebuild b/completions/ebuild new file mode 100644 index 000..cd6e17e --- /dev/null +++ b/completions/ebuild @@ -0,0 +1,34 @@ +# Gentoo Linux Bash Shell Command Completion +# +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# +# ebuild completion command +# +_ebuild() +{ +local cur opts +COMPREPLY=() +cur=${COMP_WORDS[COMP_CWORD]} + +opts=help setup clean fetch digest manifest unpack compile test preinst \ +install postinst qmerge merge unmerge prerm postrm config package rpm \ +configure prepare + +if [[ $COMP_CWORD -eq 1 ]] ; then +COMPREPLY=($(compgen -f -X !*.ebuild -- ${cur}) \ +$(compgen -d -- ${cur}) \ +$(compgen -W '--debug --force --help --ignore-default-opts --skip-manifest' -- ${cur})) + +elif [[ $COMP_CWORD -eq 2 ${COMP_WORDS[1]} = --debug --force --ignore-default-opts --skip-manifest ]] ; then +COMPREPLY=($(compgen -f -X !*.ebuild -- ${cur}) $(compgen -d -- ${cur})) + +elif [[ $COMP_CWORD -ge 2 ]] ; then +COMPREPLY=($(compgen -W ${opts} -- ${cur})) +fi +return 0 +} +complete -o filenames -F _ebuild ebuild + +# vim: ft=sh:et:ts=4:sw=4:tw=80 diff --git a/completions/ekeyword b/completions/ekeyword new file mode 100644 index 000..3bf3006 --- /dev/null +++ b/completions/ekeyword @@