[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash-completion with triggers

On Sun, 10 Apr 2011 12:24:11 +0200, Ansgar Burchardt wrote:

> David Paleino <dapal@debian.org> writes:
> > I've implemented a new revision of bash-completion, which uses
> > debtriggers(5) to load only relevant completions, and symlink them when
> > something touches /usr/bin/, /usr/games/, /usr/sbin/, /sbin/, /bin/, and so
> > on.
> zsh supports autoloading of functions: the time it is called first, zsh
> will look for its definition in several directories (see "autoloading
> functions" in zshmisc(1)).  As far as I know this is used by the
> completion function to avoid loading unneeded parts.
> Would it be possible for bash to use a similar scheme instead of using
> triggers?  That way completions would also be available for software
> installed into /usr/local (not using dpkg) without having to run some
> command.

Yes, but we planned that upstream for 2.x or even later, since it involves
some rewriting of bash-completion itself.

Also, we're currently targetting bash >= 3.2, so we need to take care of
backwards compatibility.
For 2.0, we're probably bumping that requirement to >= 4.1, so we can use newer
bash features, which will hopefully make things faster.


 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Attachment: signature.asc
Description: PGP signature

Reply to: