Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 23107 Details for
Bug 36910
bash-completion broken for "emerge /path/to/any.ebuild"
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Latest and greatest.
gentoo (text/plain), 23.20 KB, created by
Zach Forrest
on 2004-01-03 15:04:11 UTC
(
hide
)
Description:
Latest and greatest.
Filename:
MIME Type:
Creator:
Zach Forrest
Created:
2004-01-03 15:04:11 UTC
Size:
23.20 KB
patch
obsolete
># -*- shell-script -*- ># ># Time-stamp: <2004-01-03 14:58:52 zach> ># ># 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> ># ># Maintainer: Zach Forrest <zach@disinformation.ca> ># ># $Id$ > ># emerge completion command ># >have emerge && { >_emerge() >{ > local cur curword numwords words opts cond prepend > local grepcmd sedcmd setsma setbig stopre stophere i > local portagedir origdir pkgdbdir cachedir > local action actionpos actionre sysactions eactions pkgpos > local version_mode searchdesc_mode help_mode resume_mode ># local findopt deleteopt > COMPREPLY=() > cur="${COMP_WORDS[COMP_CWORD]}" > numwords=${#COMP_WORDS[*]} > curword=${COMP_CWORD} > words="${COMP_WORDS[*]}" > origdir="${PWD}" > portagedir='/usr/portage' > cachedir='/usr/portage/metadata/cache' > pkgdbdir='/var/db/pkg' > actionre=' (-[CPcis]|(s(y(nc|stem)|earch)|r(egen|sync)|(unmerg|prun)e|world|((dep)?clean)|(in(fo|ject))))\b' > stopre=' (depclean|info|regen|r?sync|system|world|--(resume|skipfirst))\b' > opts='' ># # List of short/long option pairs. ># optpairs=('-h' '--help' \ ># '-b' '--buildpkg' \ ># '-B' '--buildpkgonly' \ ># '-l' '--changelog' \ ># '-d' '--debug' \ ># '-D' '--deep' \ ># '-e' '--emptytree' \ ># '-f' '--fetchonly' \ ># '-O' '--nodeps' \ ># '-n' '--noreplace' \ ># '-o' '--onlydeps' \ ># '-p' '--pretend' ># '-q' '--quiet' \ ># '-S' '--searchdesc' \ ># '-u' '--update' \ ># '-U' '--upgradeonly' \ ># '-k' '--usepkg' \ ># '-K' '--usepkgonly' \ ># '-v' '--verbose' \ ># '-V' '--version') > # Test for action. > action=$(echo "${words}" | egrep -o --regex="${actionre}" | tr -d ' ') > if [[ "${action}" ]]; then > for ((i = 0; i < ${numwords}; i++ )); do > if [[ "${COMP_WORDS[${i}]}" == "${action}" ]]; then > actionpos=${i} > pkgpos=$((actionpos + 1)) > break > fi > done > if [ ${#action} -eq 2 ]; then > case "${action}" in > '-C') action='unmerge' ;; > '-P') action='prune' ;; > '-c') action='clean' ;; > '-i') action='inject' ;; > '-s') action='search' ;; > esac > fi > else > for ((i = 1; i < ${numwords}; i++ )); do > if [[ ! "${COMP_WORDS[$i]}" == -* ]]; then > pkgpos=${i} > break > fi > done > [[ "${pkgpos}" ]] || pkgpos=${numwords} > fi > # Check for special cases. > version_mode=$(echo "${words}" | egrep -o -regexp=" -(V|-version)\b") > searchdesc_mode=$(echo "${words}" | egrep -o --regexp=" -(S|-searchdesc)\b") > help_mode=$(echo "${words}" | egrep -o --regexp=" -(h|-help)\b") > # Handle special cases. > if [[ "${action}" = 'search' ]] || [[ "${searchdesc_mode}" ]] || [[ "${version_mode}" ]]; then > unset COMPREPLY > return 0 > elif [[ "${help_mode}" ]]; then > unset COMPREPLY > [ ${curword} -eq 2 ] && COMPREPLY=($(compgen -W 'rsync system config' | grep ^${cur})) > return 0 > fi > # Complete on options. > if [[ "${cur}" == -* ]]; then > # If a resume option was specified, it needs special handling. > resume_mode=$(echo "${words}" | egrep -o --regexp=" --(resume|skipfirst)\b") > if [[ "${resume_mode}" ]]; then > if [[ "${cur}" == --* ]]; then > opts="--pretend --resume --skipfirst" > elif [[ "${cur}" == -* ]]; then > [[ -z $(echo "${words}" | egrep -o --regexp=" --pretend\b") ]] && opts="-p" > fi > elif [[ "${cur}" == --* ]]; then > # Complete on long options. > opts="--autoclean \ > --buildpkg --buildpkgonly \ > --changelog --clean --columns \ > --debug --deep \ > --emptytree \ > --fetchonly \ > --noconfmem --nodeps --noreplace --nospinner > --oneshot --onlydeps \ > --pretend \ > --quiet \ > --update --upgradeonly --usepkg --usepkgonly \ > --verbose" > if [ ${curword} -eq 1 ] && [ ${numwords} -eq 2 ]; then > opts="${opts} --help --resume --searchdesc --version" > fi ># # This will delete a long option from the list of completions ># # if the corresponding short option is present. ># for ((i = 0; i <= (${#optpairs[@]} - 2); i++ )); do ># findopt="${optpairs[$i]}" ># deleteopt="${optpairs[$((++i))]}" ># if [[ $(echo "${words}" | egrep -o --regex=" ${findopt}\b") ]]; then ># opts=$(echo "${opts}" | sed -e "s: ${deleteopt}::") ># fi ># done > elif [[ "${cur}" == -* ]]; then > # Complete on short options. > opts="-B -D -K -O -U -a -b -d -e -f -k -l -n -o -p -u -v -q" > if [ ${curword} -eq 1 ] && [ ${numwords} -eq 2 ]; then > opts="${opts} -h -S -V" > fi > if [[ -z "${action}" ]] && [ ${curword} -eq $((pkgpos - 1)) ]; then > opts="${opts} -C -P -c -i -s" > fi ># # This will delete a short option from the list of completions ># # if the corresponding long option is present. ># for ((i = 0; i <= (${#optpairs[@]} - 2); i++ )); do ># deleteopt="${optpairs[$i]}" ># findopt="${optpairs[$((++i))]}" ># if [[ $(echo "${words}" | egrep -o --regex=" ${findopt}\b") ]]; then ># opts=$(echo "${opts}" | sed -e "s: ${deleteopt}::") ># fi ># done > fi > # Generate the reply. > COMPREPLY=($(compgen -W "${opts}" | grep ^${cur})) > # NOTE: This slows things down! > # (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 > fi > # Stop completion if a special case is encountered. > stophere=$(echo "${words}" | egrep -o --regex="${stopre}") > if [[ "${stophere}" ]]; then > unset COMPREPLY > return 0 > fi > # Complete on filenames if given a path. > if [[ "${cur} " == @('/'|'.'|'~'|'$')* ]]; then > COMPREPLY=($(compgen -G "${cur}*")) > return 0 > fi > # Check for conditional. > cond="${cur%%[A-Za-z0-9]*}" > cur="${cur:${#cond}}" > [[ "${cond:0:1}" == "'" ]] && prepend="-P ${cond:1}" > # Complete on installed packages when unmerging. > if [[ "${action}" == 'unmerge' ]]; then > 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 -X '!*-*' -S '/' -G "${cur}*") > COMPREPLY=($(echo "${setsma}")) > fi > cd "${origdir}" > return 0 > fi > ># overlay=$(egrep -o --regex="^PORTDIR_OVERLAY=([^'\"][\S]*|(['\"])[^\2]+\2$)" /etc/make.conf) ># overlay=$(echo ${overlay#PORTDIR_OVERLAY=} | sed -r -e "s:['\"]::g") ># cd "${overlay}" ># setbig="${setbig} $(compgen -G ${cur}*)" > > # Change to the Portage directory. > cd "${portagedir}" > # Handle cases where a conditional is specified. > if [[ "${cond}" ]]; then > if [[ "${cur}" ]]; then > if [[ $(echo "${cur}" | grep '/') ]]; then > setbig=$(compgen -G "${cur}*") > COMPREPLY=($(compgen ${prepend} -W "${setbig}" -- "${cur}")) > if [[ ${#COMPREPLY[@]} -le 1 ]]; then > # Now complete on the specific versions. > cd "${cachedir}" > setbig=$(compgen -G "${cur}*") > COMPREPLY=($(compgen ${prepend} -W "${setbig}" -- "${cur}")) > fi > else > setsma=$(compgen ${prepend} -S '/' -G "${cur}*") > if [[ $(echo "${setsma}" | grep '/' | wc -l) = 1 ]]; then > setbig=$(compgen ${prepend} -G "${cur}*/*") > COMPREPLY=($(echo "${setbig}")) > else > COMPREPLY=($(echo "${setsma}")) > fi > fi > else > setsma=$(command find -maxdepth 1 -type d | \ > egrep -o --regex="\w+-[a-z0-9]+$" | \ > sed -r -e 's:(^.*$):\1/:') > COMPREPLY=($(compgen -W '${setsma}' -- "${cur}")) > fi > # If all else fails, try to complete on package names without the > # category being specified. Neato! > if [[ ! "${COMPREPLY}" ]]; then > cd "${portagedir}" > setsma=$(command ls -d [a-z]*-[a-z0-9]*/${cur}* 2>/dev/null | \ > sed -r -e 's:^[^/]+/(.*$):\1:' | sort | uniq) > COMPREPLY=($(compgen ${prepend} -W '${setsma}' -- ${cur})) > if [[ ${#COMPREPLY[@]} -le 1 ]]; then > # Now complete on the specific versions. > cd "${cachedir}" > setsma=$(command find -maxdepth 2 -type f -name "${cur}*" | \ > egrep -o --regex="[a-z]+-[a-z0-9]+/.*$" | \ > sed -r -e 's:^[^/]+/(.*$):\1:') > COMPREPLY=($(compgen ${prepend} -W '${setsma}' -- "${cur}")) > fi > > fi > cd "${origdir}" > return 0 > fi > # Complete on packages. > grepcmd="grep -E ^${cur}.*" > sedcmd="sed -e :^[^-]*$:d" > if [ ${COMP_CWORD} -eq 1 ]; then > sysactions=$'\n'"system"$'\n'"world"$'\n'"rsync"$'\n'"sync" > else > # Only allow these actions if no packages have been specified. > if [[ ! " ${words} " == *" "*[/]*" "* ]]; then > sysactions=$'\n'"system"$'\n'"world" > else > sysactions='' > fi > fi > if [[ ! "${action}" ]] && [ ${curword} -le ${pkgpos} ]; then > eactions=$'\n'"clean"$'\n'"depclean"$'\n'"inject"$'\n'"prune"$'\n'"regen"$'\n'"search"$'\n'"unmerge" > fi > if [ "${cur}" ]; then > # Handle absolute paths. > # Thanks to Ed Catmur <ed@catmur.co.uk> for pointing this out and > # submitting the patch. > if [[ "${cur} " == @('/'|'.'|'~'|'$')* ]]; then > COMPREPLY='' > elif [ $(echo "${cur}" | grep '/') ]; then > setbig=$(compgen -G "${cur}*" | ${sedcmd})"${sysactions}""${eactions}" > COMPREPLY=($(echo "${setbig}" | ${grepcmd})) > else > setsma=$(compgen -S '/' -G "${cur}*" | ${sedcmd})"${sysactions}""${eactions}" > if [ $(echo "${setsma}" | ${grepcmd} | grep '/' | wc -l) = 1 ]; then > setbig=$(compgen -G "*/*" | ${sedcmd})"${sysactions}""${eactions}" > COMPREPLY=($(echo "${setbig}" | ${grepcmd})) > else > COMPREPLY=($(echo "${setsma}" | ${grepcmd})) > fi > fi > else > setsma=$(command find -maxdepth 1 -type d | \ > egrep -o --regex="[a-z]+-[a-z0-9]+$" | \ > sed -r -e 's:(^.*$):\1/:')"${sysactions}""${eactions}" > COMPREPLY=($(compgen -W '${setsma}' -- ${cur})) > fi > # If all else fails, try to complete on package names without the > # category being specified. Neato! > if [[ ! "${COMPREPLY}" ]]; then > cd "${portagedir}" > setsma=$(command ls -d [a-z]*-[a-z0-9]*/${cur}* 2>/dev/null | \ > sed -r -e 's:^[^/]+/(.*$):\1:') > COMPREPLY=($(compgen -W '${setsma}' -- ${cur})) > fi > cd "${origdir}" > return 0 >} >complete $filenames -F _emerge emerge >} > ># ebuild completion command ># >have ebuild && { >_ebuild() >{ > local cur > COMPREPLY=() > cur=${COMP_WORDS[COMP_CWORD]} > 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 $default -F _ebuild ebuild >} > ># rc-update completion command ># >have rc-update && { >_rcupdate() >{ > local cur initdir runlvdir origdir > origdir="${PWD}" > initdir='/etc/init.d' > COMPREPLY=() > cur=${COMP_WORDS[COMP_CWORD]} > if [ $COMP_CWORD -eq 1 ]; then > if [[ "${cur}" == -* ]]; then > COMPREPLY=($(compgen -W '-a -d -s' | grep ^${cur})) > else > COMPREPLY=($(compgen -W 'add del show' ${cur})) > fi > else > if [ $COMP_CWORD -eq 3 ] || [ "${COMP_WORDS[1]}" == "show" ] || [ "${COMP_WORDS[1]}" == "-s" ]; then > COMPREPLY=($(compgen -W "$(rc-status --list)" | grep ^${cur})) > else > cd "${initdir}" > COMPREPLY=($(compgen -X "*.@(c|sh|test)" -G "${cur}*")) > cd "${origdir}" > fi > fi > return 0 >} >complete -F _rcupdate rc-update >} > ># rc-status completion command ># >have rc-status && { >_rcstatus() >{ > local cur > cur=${COMP_WORDS[COMP_CWORD]} > if [ $COMP_CWORD -eq 1 ]; then > if [[ "${cur}" == --* ]]; then > COMPREPLY=($(compgen -W '--all --list --unused' | grep ^${cur})) > elif [[ "${cur}" == -* ]]; then > COMPREPLY=($(compgen -W '-a -l -u' | grep ^${cur})) > else > COMPREPLY=($(compgen -W "$(rc-status --list)" | grep ^${cur})) > fi > else > unset COMPREPLY > fi > return 0 >} >complete -F _rcstatus rc-status >} > ># gcc-config completion command ># >have gcc-config && { >_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 >} > ># java-config completion command ># >have java-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 > 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}) > 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" > 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="--classpath --clean-system-classpath \ > --exec \ > --full-classpath \ > --jar --java --javac --java-version --jdk-home --jre-home \ > --list-available-packages --list-available-vms \ > --set-system-classpath --set-system-vm --set-user-classpath --set-user-vm" > fi > ;; > esac > else > opts="" > fi > COMPREPLY=($(compgen $nospace -W "${opts}" | grep ^${cur})) > return 0 >} >complete $nospace -F _javaconfig java-config >} > ># opengl-update completion command ># >have opengl-update && { >_openglupdate() >{ > local cur opts numwords > COMPREPLY=() > cur="${COMP_WORDS[COMP_CWORD]}" > numwords=${#COMP_WORDS[*]} > if [ ${numwords} -gt 2 ]; then > return 0 > fi > COMPREPLY=($(compgen -W 'nvidia xfree' ${cur})) > 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 -F _openglupdate opengl-update >} > ># browser-config completion command ># >have browser-config && { >_browserconfig() >{ > local cur prev methods browserdir origdir browsers > COMPREPLY=() > browserdir="/usr/share/browser-config" > origdir="${PWD}" > cur="${COMP_WORDS[COMP_CWORD]}" > prev="${COMP_WORDS[COMP_CWORD-1]}" > if [[ "${cur}" == -* ]] && [ ${COMP_CWORD} -eq 1 ]; then > COMPREPLY=($(compgen -W '-b -h -m' | grep ^${cur})) > elif [[ "${prev}" == "-b" ]]; then > cd "${browserdir}" > browsers=$(command ls ${cur}* 2>/dev/null) > COMPREPLY=($(compgen -W "${browsers}" ${cur})) > cd "${origdir}" > elif [[ "${prev}" == "-m" ]]; then > methods='same_window new_window new_tab new_browser' > COMPREPLY=($(compgen -W "${methods}" | grep ^${cur})) > if [[ ! "${COMPREPLY}" ]]; then > COMPREPLY='' > fi > else > unset COMPREPLY > fi > return 0 >} >complete -F _browserconfig browser-config >} > ># etcat completion command ># ># have etcat && { ># _etcat() ># { ># # -b </path/to/file> [category] ># # belongs </path/to/file> [category] ># # Searches for the package which a file belongs to with an option ># # to restrict a search to a single or multiple category. Wildcards ># # in the category name is accepted to speed up searching. ># # (eg. etcat belongs /usr/lib/libmpeg.so "media-*") ># # ># # -c <package[-version]> ># # changes <package[-version]> ># # Outputs ChangeLog entry for the package and version specified. ># # Uses the latest package version if none specified. ># # ># # -d <regex expression> ># # depends <regex expression> ># # Searches through portage for a dependency string satisfying that ># # regular expression. ># # ># # -f <package[-version]> ># # files <package[-version]> ># # Lists all the files installed for this package. ># # ># # -s <package> ># # size <package> ># # Outputs the installed size of the package. ># # ># # -u <package[-version]> ># # uses <package[-version]> ># # Outputs the USE flags supported by this package and also their ># # installed state and description. ># # ># # -v <package> ># # versions <package> ># # Output all the versions for packages that match the package name ># # given with indication of whether the packages is stable, masked, ># # unstable or installed. ># ># } ># complete -F _etcat etcat ># } > ># # epm completion command ># # ># have epm && { ># _epm() ># { ># ># } ># complete -F _epm epm ># } > ># # euse completion command ># # ># have euse && { ># _euse() ># { ># # DESCRIPTION ># # euse is used to set(disable/enable) USE flags /etc/make.conf without having to edit the file directly. It is also used to ># # get detail information about use flags like description, status of flags(enabled/disabled), type of flag(global/local) ># # etc. It can also be queried for viewing the current use flag settings in /etc/make.conf, /etc/make.defaults and environ- ># # ment. ># # OPTIONS ># # -c, --conf ># # Print the USE flag setting in /etc/make.conf ># # -d, --defaults ># # Print the USE flag setting in /etc/make.profile/make.defaults ># # -e, --env ># # Print the USE flag setting in environment ># # -E, --enable ># # Enables USE flag(s) in make.conf. It accepts one or more USE flags space separted as parameters. Please read ># # README for all the different cases it handles. ># # -D, --disable ># # Disables USE flag(s) in make.conf. Puts a '-' sign infront of the use flag and appends to USE setting of ># # make.conf. It accepts one or more USE flags space separted as parameters. Please read README for all the different ># # cases it handles. ># # -i, --info ># # Prints detail information about the USE flag(s). If no arguments are given then all the USE flag(global & local) ># # information is printed. If one or more arguments are given(space separated) then information of only those flags ># # are printed. ># # The output is in the following format: ># # alpha [-] [ ] [G] indicates that architecture ... ># # moznocompose [+] [C] [L] [net-www/mozilla] : If you ... ># # The column descriptions are: ># # flag_name ># # name of the use flag ># # flag_status ># # indicates whether the USE flag is enabled or disabled. - indicates disabled, + indicates enabled. ># # flag_location ># # indicates where the USE flag is enabled or disabled. C indicates make.conf, D indicates make.defaults, E ># # indicates environment. ># # flag_type ># # indicates if the flag is global USE flag or a local USE flag.If it is local USE flag, then the description ># # column begins with the package which it belongs to in square brackets. See moznocompose example above. ># # description ># # gives a short description of the USE flag ># # -h, --help ># # Show the help message listing all the available flags and a short description ># # -v, --version ># # Show the version information ># ># } ># complete -F _euse euse ># }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 36910
:
22920
| 23107