[Bash-completion-devel] New directory layout

Guillaume Rousse Guillaume.Rousse at inria.fr
Thu Jan 15 15:55:05 UTC 2009


Santiago M. Mola a écrit :
> Hi all,
> 
> Based on the current aproach on Gentoo and on comments from other
> distros, I'd like to propose a new directory layout for bash-completion.
> 
> El lun, 12-01-2009 a las 23:55 +0100, Guillaume Rousse escribió:
>> We also have a slightly initialisation system, with a file
>> in /etc/profile.d sourcing a system-wide /etc/sysconfig/bash-completion
>> configuration file, then a ~/.bash-completion to set up relevant
>> options. This let sysadmin configure bash completion globally, or not,
>> while still allowing individual users to do it in the last case.
> 
> In Gentoo, we install all bash-completion modules
> to /usr/share/bash-completion/.
> 
> Modules are enabled system-wide when they're symlinked
> from /etc/bash_completion.d/ and users can enable extra modules creating
> symlinks in ~/.bash_completion.d/.
> 
> We have a Gentoo-specific tool for handling these symlinks, but I guess
> each distro would take its own aproach, which could be a) providing a
> configuration interface, b) enabling all modules by default (like some
> already do), c) let the user do it himself. 
> 
> I think installing modules to /usr/share/bash-completion is more
> consistent than the current state (I don't think bash-completion modules
> can be considered anything near to configuration files).
> 
> Also, this provides more flexibility for distros and users. And it seems
> it's needed since enabling/disabling modules system and user wide is a
> quite common demanded feature.
> 
> With respect backwards compatibility, there's not too much to say: if
> someone installs a module directly to /etc/bash_completion.d, it'll
> obviously work.
> 
> Thoughts?
This is quite similar to how munin plugins works, and it's fare more 
compliant with FHS. It's also more resource-savy to evualuate the 
availability of a command (hence the usefulness of its completion 
function) at installation time, not each time a new shell is started.

I guess you still keep generic functions, as well as logic for sourcing 
individual completion files, in /etc/bash_completion ?
-- 
Guillaume Rousse
Service des Moyens Informatiques
INRIA Saclay - Île-de-France
Parc Orsay Université, 4 rue J. Monod
91893 Orsay Cedex France
Tel: 01 69 35 69 62



More information about the Bash-completion-devel mailing list