From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 23 Oct 2004 07:48:22 +0400 From: Alexey Tourbin To: Sisyphus Message-ID: <20041023034822.GZ2017@solemn.turbinal.org> Mail-Followup-To: Sisyphus References: <20041023030533.GY2017@solemn.turbinal.org> <20041023033239.GC3493@wrars-comp.wrarsdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ELawpaRm0uGyL1wg" Content-Disposition: inline In-Reply-To: <20041023033239.GC3493@wrars-comp.wrarsdomain> Subject: [sisyphus] Re: zsh completion for rpm X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2004 03:49:05 -0000 Archived-At: List-Archive: --ELawpaRm0uGyL1wg Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 23, 2004 at 09:32:39AM +0600, Andrey Rahmatullin wrote: > > =CB=DC=DB =C1=D7=D4=CF=CD=C1=D4=C9=DE=C5=D3=CB=C9 =CF=C2=CE=CF=D7=CC=D1= =C5=D4=D3=D1 =D0=D2=C9 =C9=DA=CD=C5=CE=C5=CE=C9=C9 =C2=C1=DA=D9 rpm =C9/=C9= =CC=C9 apt. > =E7=C4=C5 =DC=D4=CF =D7=C9=C4=CE=CF? =F7 /usr/share/zsh/Completion/*/_{rp= m,apt} =D7=C9=C4=CE=CF > =CF=C2=CE=CF=D7=CC=C5=CE=C9=C5 =D4=CF=CC=D8=CB=CF =C5=D3=CC=C9 =CB=DC=DB = =D3=D4=C1=D2=DB=C5 =CE=C5=C4=C5=CC=C9. =E9=CC=C9 =D1 =DE=C5=C7=CF-=D4=CF = =CE=C5 =D0=CF=CE=C9=CD=C1=C0? =EB=C1=CB =D2=C1=DA =D3=D4=C1=D2=D9=CA /usr/share/zsh/Completion/*/_rpm =D0= =CF=C4=CD=C5=CE=C9=D4=D3=D1 =DE=C5=D2=C5=DA $fpath =CE=C1 =CE=CF=D7=D9=CA _rpm. =F7 =CE=CF=D7=CF=CD _rpm =C9=D3=D0=CF=CC=D8=DA=D5=C5=D4=D3=D1 `_rpm_package= s installed', =D0=CF=DC=D4=CF=CD=D5 =D3=CD=CF=D4=D2=C5=D4=D8 =CE=C1=C4=CF =D7 /usr/share/zsh/Completion/*/_rpm_packages: _rpms_caching_policy () { # rebuild if cache is more than a week old oldp=3D( "$1"(mw+1) ) (( $#oldp )) && return 0 pkg_indices=3D( /var/lib/rpm/{packages.rpm,Packages}(N) ) for pkg_index in $pkg_indices; do [[ "$pkg_index" -nt "$1" ]] && return 0 done } =FC=D4=CF=D4 =CB=CF=C4 =CE=C5=CD=CE=CF=C7=CF =C7=D2=C5=DB=C5=CE (=D0=D2=C5= =D6=C4=C5 =D7=D3=C5=C7=CF =CF=D4=D3=D4=D5=D0=C1=CD=C9), =D7 =D3=CC=C5=C4=D5= =C0=DD=C5=CA =D3=C2=CF=D2=CB=C5 =D1 =C5=C7=CF =D0=C5=D2=C5=C4=C5=CC=C1=C0 =CE=C1=20 _rpms_caching_policy () { local cache_path=3D"$1" cache_ident=3D"$_cache_ident" # rebuild if cache is more than a week old oldp=3D( "$cache_path"(mw+1) ) (( $#oldp )) && return 0 if [[ $cache_ident =3D RPMS_installed ]]; then pkg_indices=3D( /var/lib/rpm/{packages.rpm,Packages}(N) ) else pkg_indices=3D( /var/lib/apt/lists/*(.N) ) fi for pkg_index in $pkg_indices; do [[ "$pkg_index" -nt "$cache_path" ]] && return 0 done return 1 } > --=20 > WBR, wRAR (ALT Linux Team) --ELawpaRm0uGyL1wg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBedSFfBKgtDjnu0YRAs7BAJwNveI9SNp40py6NqIsQlXFhSjnvACePUfY nMN7tg6pbSs7WG+efSDkSjQ= =oWJc -----END PGP SIGNATURE----- --ELawpaRm0uGyL1wg--