summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2002-01-14 11:30:19 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2002-01-14 11:30:19 +0000
commit126d3b946863ac578ddcee45c0e29f4e7c810983 (patch)
tree9e5ec042ea16963cd13131eb86a926ec43dede1e /Completion
parent2cc2628cd10110e6310c0eb5677f5ffad2ba5b8e (diff)
downloadzsh-126d3b946863ac578ddcee45c0e29f4e7c810983.tar.gz
zsh-126d3b946863ac578ddcee45c0e29f4e7c810983.tar.xz
zsh-126d3b946863ac578ddcee45c0e29f4e7c810983.zip
16443: fix urpmi.addmedia --distrib; set cache policy just once
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Mandrake/Command/_urpmi23
1 files changed, 12 insertions, 11 deletions
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 "$@"