From 126d3b946863ac578ddcee45c0e29f4e7c810983 Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Mon, 14 Jan 2002 11:30:19 +0000 Subject: 16443: fix urpmi.addmedia --distrib; set cache policy just once --- Completion/Mandrake/Command/_urpmi | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'Completion') diff --git a/Completion/Mandrake/Command/_urpmi b/Completion/Mandrake/Command/_urpmi index a51c6a5cc..d78c1acaf 100644 --- a/Completion/Mandrake/Command/_urpmi +++ b/Completion/Mandrake/Command/_urpmi @@ -13,27 +13,21 @@ _urpmi_cache_policy() { _urpmi() { local state context line ret=1 typeset -A opt_args - local update_policy - - zstyle -s ":completion:*:*:urpmi:*" cache-policy update_policy - if [[ -z "$update_policy" ]]; then - zstyle ":completion:*:*:urpmi:*" cache-policy _urpmi_cache_policy - fi case "$service" in urpmi.addmedia ) _arguments -A '-*' \ "(--wget)--curl[use curl to retrieve distant files]" \ - "--distrib[automatically create all media from an installation medium]" \ + "(:)--distrib[automatically create all media from an installation medium]:media URL:->media_url" \ "--update[mark as update media]" \ "(--curl)--wget[use wget to retrieve distant files]" \ "-c[clean headers cache directory]" \ "-f[force generation of hdlist files]" \ "-h[try to find and use synthesis or hdlist file]" \ - ":name of media: " \ - ":media URL:->media_url" \ - ": :(with)" \ - ":relative path to hdlist file: " \ + "(--distrib):name of media: " \ + "(--distrib):media URL:->media_url" \ + "(--distrib): :(with)" \ + "(--distrib):relative path to hdlist file: " \ && ret=0 ;; urpmi.removemedia ) @@ -121,4 +115,11 @@ _urpmi() { return $ret } +local update_policy + +zstyle -s ":completion:*:*:urpmi:*" cache-policy update_policy +if [[ -z "$update_policy" ]]; then + zstyle ":completion:*:*:urpmi:*" cache-policy _urpmi_cache_policy +fi + _urpmi "$@" -- cgit 1.4.1