diff options
Diffstat (limited to 'gentoo')
-rw-r--r-- | gentoo | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -21,8 +21,8 @@ have() _portdir() { ( - source /etc/make.globals 2>/dev/null - source /etc/make.conf 2>/dev/null + source @GENTOO_PORTAGE_EPREFIX@/etc/make.globals 2>/dev/null + source @GENTOO_PORTAGE_EPREFIX@/etc/make.conf 2>/dev/null echo ${PORTDIR} if [[ $1 == '-o' ]] ; then @@ -73,19 +73,19 @@ _pkgname() -I) # Complete either the category or the complete package name if [[ $cur == */* ]]; then - COMPREPLY=($(builtin cd /var/db/pkg; compgen -W "$(compgen -G "$cur*" )" -- $cur)) + COMPREPLY=($(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg; compgen -W "$(compgen -G "$cur*" )" -- $cur)) else - COMPREPLY=($(builtin cd /var/db/pkg; compgen -W "$(compgen -G "$cur*" -S /)" -- $cur)) + COMPREPLY=($(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg; compgen -W "$(compgen -G "$cur*" -S /)" -- $cur)) fi # We may just have finished completing the category. # Make sure there isn't anything more to complete now. if [[ ${#COMPREPLY[@]} == 1 ]]; then - COMPREPLY=($(builtin cd /var/db/pkg; compgen -W "$(compgen -G "$COMPREPLY*")" -- $cur)) + COMPREPLY=($(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg; compgen -W "$(compgen -G "$COMPREPLY*")" -- $cur)) fi if [[ -z "${COMPREPLY}" ]] ; then only=1 - _pkgname_only ${cur} /var/db/pkg + _pkgname_only ${cur} @GENTOO_PORTAGE_EPREFIX@/var/db/pkg fi ;; -A) @@ -447,9 +447,9 @@ _emerge() if [[ "${action}" == '--unmerge' ]]; then if [[ -n "${cur}" ]] ; then if [[ "${cur}" == */* ]]; then - words=$(builtin cd /var/db/pkg; compgen -G "${cur}*") + words=$(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg; compgen -G "${cur}*") else - words=$(builtin cd /var/db/pkg; compgen -S '/' -G "${cur}*") + words=$(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg; compgen -S '/' -G "${cur}*") local n=0 for i in ${words} ; do @@ -457,17 +457,17 @@ _emerge() done if [[ ${n} -eq 1 ]] ; then - words="$(builtin cd /var/db/pkg ; compgen -G "*-*/*")" + words="$(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg ; compgen -G "*-*/*")" fi fi COMPREPLY=($(for i in ${words} ; do \ [[ ${i} == ${cur}* ]] && echo ${i} ; \ done)) else - COMPREPLY=($(builtin cd /var/db/pkg ; compgen -S '/' -G "*-*")) + COMPREPLY=($(builtin cd @GENTOO_PORTAGE_EPREFIX@/var/db/pkg ; compgen -S '/' -G "*-*")) fi - [[ -z "${COMPREPLY}" ]] && _pkgname_only ${cur} /var/db/pkg + [[ -z "${COMPREPLY}" ]] && _pkgname_only ${cur} @GENTOO_PORTAGE_EPREFIX@/var/db/pkg return 0 fi @@ -743,7 +743,7 @@ _gentoo_style_init() fi return 0 } -complete -F _gentoo_style_init /etc/init.d/* +complete -F _gentoo_style_init @GENTOO_PORTAGE_EPREFIX@/etc/init.d/* # # rc completion command @@ -755,7 +755,7 @@ _rc() 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)) + COMPREPLY=($(compgen -W "$(for i in @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/*; do echo ${i##*/}; done)" -- $cur)) fi return 0 } @@ -808,11 +808,11 @@ _rcupdate() if ([[ $COMP_CWORD -eq 3 ]] && [[ -z "$show" ]]) || \ ([[ $COMP_CWORD -eq 2 ]] && [[ -n "$show" ]]) then - COMPREPLY=($(compgen -W "$(for i in /etc/runlevels/*; do echo ${i##*/}; done)" -- $cur)) + COMPREPLY=($(compgen -W "$(for i in @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/*; do echo ${i##*/}; done)" -- $cur)) elif [[ $COMP_CWORD -eq 2 ]]; then - COMPREPLY=($(compgen -X "*.@(c|sh|test)" -W "$(for i in /etc/init.d/*; do echo ${i##*/}; done)" $cur)) + COMPREPLY=($(compgen -X "*.@(c|sh|test)" -W "$(for i in @GENTOO_PORTAGE_EPREFIX@/etc/init.d/*; do echo ${i##*/}; done)" $cur)) elif [[ ${#COMP_WORDS[*]} -gt 2 ]] ; then - COMPREPLY=($(compgen -W "$(for i in /etc/runlevels/*; do echo ${i##*/}; done)" -- $cur)) + COMPREPLY=($(compgen -W "$(for i in @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/*; do echo ${i##*/}; done)" -- $cur)) else unset COMPREPLY fi @@ -1067,7 +1067,7 @@ _browserconfig() if [[ ${COMP_CWORD} -eq 1 ]]; then COMPREPLY=($(compgen -W '-b -h -m' -- ${cur})) elif [[ "${prev}" == "-b" ]]; then - COMPREPLY=($(compgen -W "$(for i in /usr/share/browser-config/*; do [ -f $i ] && echo ${i##*/}; done)" $cur)) + 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 @@ -1446,8 +1446,8 @@ have webapp-config && { _webapp_complete_appver() { local x proot ibase cur="$2" - eval $(. /etc/vhosts/webapp-config ; \ - echo proot="${MY_PERSISTROOT:-/var/db/webapps}" ; \ + eval $(. @GENTOO_PORTAGE_EPREFIX@/etc/vhosts/webapp-config ; \ + echo proot="${MY_PERSISTROOT:-@GENTOO_PORTAGE_EPREFIX@/var/db/webapps}" ; \ echo ibase="${WA_INSTALLSBASE:-installs}") case "$1" in @@ -1507,8 +1507,8 @@ _webapp_config() -d --dir -h --host -V --verbose --soft --secure --virtual-dirs \ --virtual-files --force-virtual" - eval $(. /etc/vhosts/webapp-config ; \ - echo hostroot="${VHOST_ROOT:-/var/www}") + eval $(. @GENTOO_PORTAGE_EPREFIX@/etc/vhosts/webapp-config ; \ + echo hostroot="${VHOST_ROOT:-@GENTOO_PORTAGE_EPREFIX@/var/www}") # --bug-report, --pretend, and -p can only be used as first arg if [[ ${COMP_CWORD} -gt 1 ]] ; then @@ -1574,7 +1574,7 @@ _webapp_config() # otherwise, use the default host if [[ "${host}" == "" ]] ; then - eval $(. /etc/vhosts/webapp-config ; \ + eval $(. @GENTOO_PORTAGE_EPREFIX@/etc/vhosts/webapp-config ; \ echo host="${VHOST_HOSTNAME:-localhost}") fi @@ -1675,16 +1675,16 @@ _revdep_rebuild() { fi if [[ ${action} == '--library' ]] || [[ ${action} == '-L' ]] ; then if [[ "${cur}" == */* ]]; then - words=$(builtin cd /lib; compgen -G "${cur}*") + words=$(builtin cd @GENTOO_PORTAGE_EPREFIX@/lib; compgen -G "${cur}*") else - words=$(builtin cd /lib; compgen -X '/' -G "${cur}*") + words=$(builtin cd @GENTOO_PORTAGE_EPREFIX@/lib; compgen -X '/' -G "${cur}*") local n=0 for i in ${words} ; do [[ ${i} == ${cur}* ]] && n=$((n+1)) done if [[ ${n} -eq 1 ]] ; then - words="$(builtin cd /lib ; compgen -G "*-*/*")" + words="$(builtin cd @GENTOO_PORTAGE_EPREFIX@/lib ; compgen -G "*-*/*")" fi fi COMPREPLY=($(for i in ${words} ; do \ |