diff options
author | Clint Adams <clint@users.sourceforge.net> | 2008-11-02 14:12:29 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2008-11-02 14:12:29 +0000 |
commit | 6dbf2f2f4a97e2831094a73c662484ce990e7e41 (patch) | |
tree | 2b7eb40ddd7e3518a2a962eb8accf5a1ef7d9616 /Completion/Debian/Type | |
parent | 1b78e1a9121111ccb628262202c112c199ffc6d9 (diff) | |
download | zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar.gz zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar.xz zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.zip |
25988: declare temporary cache array as local, thanks to problem noticed by Kazuhiro NISHIYAMA.
Diffstat (limited to 'Completion/Debian/Type')
-rw-r--r-- | Completion/Debian/Type/_deb_packages | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Completion/Debian/Type/_deb_packages b/Completion/Debian/Type/_deb_packages index 8ddf0e959..dea50cfdc 100644 --- a/Completion/Debian/Type/_deb_packages +++ b/Completion/Debian/Type/_deb_packages @@ -108,13 +108,14 @@ _deb_packages () { _tags packages && compadd "$expl[@]" - "${(@P)cachevar}" } - _debs_caching_policy () { - # rebuild if cache is more than a week old - oldp=( "$1"(mw+1) ) - (( $#oldp )) && return 0 - - [[ /var/cache/apt/pkgcache.bin -nt "$1" || - /var/lib/dpkg/available -nt "$1" ]] - } +_debs_caching_policy () { + # rebuild if cache is more than a week old + local -a oldp + oldp=( "$1"(mw+1) ) + (( $#oldp )) && return 0 + + [[ /var/cache/apt/pkgcache.bin -nt "$1" || + /var/lib/dpkg/available -nt "$1" ]] +} _deb_packages "$@" |