diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Mandrake/Command/_urpmi | 23 |
2 files changed, 17 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog index 68bb549ac..b8d6a8aa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-01-14 Andrej Borsenkow <bor@zsh.org> + + * 16443: Completion/Mandrake/Command/_urpmi: fix + urpmi.addmedia --distrib. Set cache policy on just the first call. + 2002-01-13 Andrej Borsenkow <bor@zsh.org> * 16437: Completion/Mandrake/Command/_urpmi: adapt 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 "$@" |