Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Slow completion when using aptitude
On Fri, Feb 4, 2011 at 11:04 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Feb 4, 1:46pm, cheer_xiao wrote:
> }
> } is "dep_packages_cache_uninstalled" a typo?
>
> Yes.
>
> I don't actually have apt installed anywhere, so I can't test whether
> the output of these functions are correct. Let's try this again -- I
> *believe* I've nixed all the typos but proofread before deployment:
>
> _deb_packages_update_uninstalled () {
> _deb_packages_update_avail
> _deb_packages_update_installed
> if (( ! $+_deb_packages_cache_uninstalled )); then
> # Package lists too large to efficiently diff with zsh expansion
> _deb_packages_cache_uninstalled=(
> $( print -l $_deb_packages_cache_avail |
> fgrep -xvf =(print -l $_deb_packages_cache_installed) )
> )
> fi
Well, the fix is here, simpler than I thought. You missed a line here:
cachevar=_deb_packages_cache_uninstalled
Now "aptitude install a<Tab>" responds quickly(within a second) and
correctly. Thanks for your help, Bart! I have learn quite a bit shell
scripting along the way.
On the other hand, I think the performance can be further improved. A
delay of 1s is good enough for me but not good enough for some.
> }
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author