Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Slow completion when using aptitude



Julien Nicoulaud wrote:
> Same here.

+ Fullquote? :)

> 2011/1/26 cheer_xiao <xiaqqaix@xxxxxxxxx>
>
>> On Wed, Jan 19, 2011 at 8:33 PM, Richard Hartmann
>> <richih.mailinglist@xxxxxxxxx> wrote:
[...]
>> >> And another small related issue: the command tab-completion of zsh
>> >> doesn't seem to know aptitude build-dep, which has been around for a
>> >> few years but (unfortunately) undocumented.
[...]

It does know `build-dep' for a while now; it was first introduced here:
    <http://www.zsh.org/mla/workers/2009/msg00193.html>


>> Thanks for your attention. I posted this to zsh-workers because I
>> found it weird enough to be very likely a bug in source code. Could
>> you tell me if you are having performance problem with aptitude
>> tab-complete? Also, let me describe my problems in more detail.
>>
>> If I type "sudo apt-get install a" and hit Tab, I only get a short
>> (yet noticeable) delay of about one second. But when I type "sudo
>> aptitude install a" and hit Tab, zsh freezes, one of the CPU cores get
>> 100% loaded. It will recover after some 10 seconds. However after
>> this, the tab-completion of aptitude is as quick as apt-get's, until I
>> log out of zsh.

_aptitude does more than _apt-get. If the second <tab> doesn't take as
long as the first, you probably got caching enabled via zstyle.

>> I am using the version from git repo:
>>
>> xiaq@~> zsh --version
>> zsh 4.3.11-dev-1 (i686-pc-linux-gnu)
>>
>> and my system:
>>
>> xiaq@~> uname -a
>> Linux xxx 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 21:21:01 UTC
>> 2011 i686 GNU/Linux
>>
>> After typing "sudo aptitude" and hitting Tab, the output is (build-dep
>> is absent):
>>
>> xiaq@~> sudo aptitude
>> autoclean                 -- erase old downloaded package files
>> changelog                 -- view a package's changelog

My installation is also from the git repo:

[snip]
% uname -srm
Linux 2.6.32-5-686 i686

% print $ZSH_VERSION
4.3.11-dev-1

% print $ZSH_PATCHLEVEL
1.5174

% sudo aptitude <tab>
- aptitude command -
autoclean                      -- erase old downloaded package files.
build-dep                      -- install the build-dependencies of packages.
changelog                      -- view a package's changelog.
[snip]

Are you sure you don't have two competing versions of zsh installed?
Then it may be possible that "print $ZSH_VERSION" and "zsh --version"
would yield different results.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



Messages sorted by: Reverse Date, Date, Thread, Author