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/Command | |
| parent | 25987: don't ztrdup the buffer returned by inet_ntoa. (diff) | |
| download | zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar.gz zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar.bz2 zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar.lz zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar.xz zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.tar.zst zsh-6dbf2f2f4a97e2831094a73c662484ce990e7e41.zip | |
25988: declare temporary cache array as local, thanks to problem noticed by Kazuhiro NISHIYAMA.
Diffstat (limited to 'Completion/Debian/Command')
| -rw-r--r-- | Completion/Debian/Command/_apt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt index c22e42ecb..bdcfcd26a 100644 --- a/Completion/Debian/Command/_apt +++ b/Completion/Debian/Command/_apt @@ -571,14 +571,14 @@ _apt_releases () { _tags apt-releases && compadd -a _apt_releases } - _apt_caching_policy () { - # rebuild if cache is more than a week old - oldp=( "$1"(mw+1) ) - (( $#oldp )) && return 0 +_apt_caching_policy () { + local -a oldp - [[ /var/cache/apt/pkgcache.bin -nt "$1" || - /var/lib/dpkg/available -nt "$1" ]] - } + oldp=( "$1"(mw+1) ) + (( $#oldp )) && return 0 + [[ /var/cache/apt/pkgcache.bin -nt "$1" || + /var/lib/dpkg/available -nt "$1" ]] +} _apt "$@" |
