[Bash-completion-devel] Towards dynamic completion loading

David Paleino dapal at debian.org
Wed Oct 26 17:22:21 UTC 2011


On Wed, 26 Oct 2011 19:33:48 +0300, Ville Skyttä wrote:

> On 10/26/2011 10:40 AM, David Paleino wrote:
> 
> > One more thing: even with the apt-get completion loaded (see my previous
> > post), I get:
> > 
> > $ sudo apt-get --purge remove <TAB>bash: _comp_dpkg_installed_packages:
> > command not found
> > 
> > I see that _comp_dpkg_installed_packages exists in completions/dpkg, but is
> > called in completions/apt-get. Seems like dpkg completion should be loaded
> > too when "apt-get" gets called.
> 
> The way things like this are handled now is that whenever you want to
> call a function that is defined in a dynamically loaded file (which may
> not be loaded), prepend "_xfunc $file" to the function call where $file
> is the file in completions/ where your function is defined.

Nice to know, thanks. :)

> Anyway, this should be fixed in commit 5811d47.  apt-build and aptitude
> seemed to have the same problem (based on looking at the code, not
> actually tested).

..and thanks for the fix!

David

-- 
 . ''`.   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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20111026/5fb8486d/attachment.pgp>


More information about the Bash-completion-devel mailing list