diff options
-rw-r--r-- | urpmi.bash-completion | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/urpmi.bash-completion b/urpmi.bash-completion index 4404e1e0..d3b04d34 100644 --- a/urpmi.bash-completion +++ b/urpmi.bash-completion @@ -29,10 +29,10 @@ _urpmi_aliases() _urpmi_packages() { - local options medias + local options + # find media selection options - options="active" for (( i=1; i < COMP_CWORD; i++ )); do case "${COMP_WORDS[i]}" in --@\(excludemedia|media\)) @@ -45,13 +45,7 @@ _urpmi_packages() esac done - # get active media list - _urpmi_get_medias $options - - for media in $medias; do - COMPREPLY+=( $( compgen -W \ - "$(grep ^$cur /var/lib/urpmi/names.$media 2>/dev/null)" ) ) - done + COMPREPLY=( $( compgen -W "$(urpmq $options --list | grep ^$cur )" -- ) ) } # urpmi completion |