[Bash-completion-devel] Towards dynamic completion loading

Ville Skyttä ville.skytta at iki.fi
Wed Oct 26 16:33:48 UTC 2011


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.

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).



More information about the Bash-completion-devel mailing list