summaryrefslogtreecommitdiffstats
path: root/urpmi.bash-completion
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-05 17:08:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-05 17:08:50 +0000
commit679031dee0cce1749851a71478a22ab8b3be939a (patch)
tree5362150515de47894dc65fdd74a870b1ca041f33 /urpmi.bash-completion
parent7bd199b919338b37b425aec86a37ee9eeb5b969e (diff)
downloadurpmi-679031dee0cce1749851a71478a22ab8b3be939a.tar
urpmi-679031dee0cce1749851a71478a22ab8b3be939a.tar.gz
urpmi-679031dee0cce1749851a71478a22ab8b3be939a.tar.bz2
urpmi-679031dee0cce1749851a71478a22ab8b3be939a.tar.xz
urpmi-679031dee0cce1749851a71478a22ab8b3be939a.zip
- urpmi.update, urpmi.addmedia:
o do not parse synthesis o drop /var/lib/urpmi/names.<medium>
Diffstat (limited to 'urpmi.bash-completion')
-rw-r--r--urpmi.bash-completion48
1 files changed, 3 insertions, 45 deletions
diff --git a/urpmi.bash-completion b/urpmi.bash-completion
index 84bd1072..2aec2e60 100644
--- a/urpmi.bash-completion
+++ b/urpmi.bash-completion
@@ -20,39 +20,6 @@ _urpmi_medias()
COMPREPLY=( $( compgen -W '${medias[@]}' -- $cur ) )
}
-_urpmi_packages()
-{
- # return list of available packages
- local medias i j IFS=$'\t\n,'
-
- # start with full media list
- _urpmi_get_medias active
-
- # find media selection options
- for (( i=1; i < COMP_CWORD; i++ )); do
- if [[ "${COMP_WORDS[i]}" == --excludemedia ]]; then
- for media in ${COMP_WORDS[i+1]}; do
- for (( j=0; j < ${#medias[@]}; j++ )); do
- [ "${medias[j]}" == "$media" ] && medias[j]=''
- done
- done
- i=$(($i+1))
- fi
- if [[ "${COMP_WORDS[i]}" == --media ]]; then
- medias=( ${COMP_WORDS[i+1]} )
- i=$(($i+1))
- fi
- if [[ "${COMP_WORDS[i]}" == --update ]]; then
- _urpmi_get_medias update
- fi
- done
-
- # get matching packages
- for media in ${medias[@]}; do
- COMPREPLY=( ${COMPREPLY[@]:-} $( grep "^$cur" /var/lib/urpmi/names.${media//\\/} 2>/dev/null ) )
- done
-}
-
_urpmi_aliases()
{
# return list of available aliases
@@ -123,14 +90,8 @@ _urpmi()
fi
COMPREPLY=( $( compgen -W "$options" -- $cur ) )
else
- # return available packages only
- if [[ ${COMP_WORDS[0]} == *rurpmi ]]; then
- _urpmi_packages
- else
- # return available packages (unless it is clearly a file) and rpm files
- if [[ "$cur" != */* ]]; then
- _urpmi_packages
- fi
+ if [[ ${COMP_WORDS[0]} != *rurpmi ]]; then
+ # return rpm files (can't list available packages anymore)
_filedir rpm
fi
fi
@@ -182,10 +143,7 @@ _urpmq()
--skip --prefer \
--use-distrib --searchmedia --ignorearch" -- $cur))
else
- # return available packages (unless it is clearly a file) and rpm files
- if [[ "$cur" != */* ]]; then
- _urpmi_packages
- fi
+ # return rpm files (can't list available packages anymore)
_filedir rpm
fi
}