[Bash-completion-devel] New directory layout

Santiago M. Mola cooldwind at gmail.com
Fri Jan 16 21:09:38 UTC 2009


Hello all,

El vie, 16-01-2009 a las 20:22 +0100, David Paleino escribió:
> On Thu, 15 Jan 2009 23:18:16 +0200, Ville Skyttä wrote:
> > The main script:
> >     /usr/share/bash-completion/bash_completion
> 
> Oh well, if we move everything to /u/s/bash-completion/, calling it
> "bash_completion" seems a bit redundant ;-)
> 
> We could rename it to "core", "base", or something suggesting *that* is the
> main file.

That looks good.

> 
> > Directory where OS default modules (e.g. ones enabled at additional package 
> > install time) are symlinked to, everything loaded by bash_completion; 
> > sysadmins or users should not touch this dir or its contents.  Tools that 
> > manage system wide modules should operate on these files, 
> > not /etc/bash_completion.d/ ones:
> >     /var/lib/bash-completion # or maybe bash[-_]completion.d ?
> 
> I don't really like /var/lib/ -- but I'd have to check FHS for any other
> suitable directory.

I don't like it either. And it's not FHS compliant anyway:

From FHS:
----
/var/lib : Variable state information
Purpose
This hierarchy holds state information pertaining to an application or
the system. State information is data that programs modify while they
run, and that pertains to one specific host. Users must never need to
modify files in /var/lib to configure a package's operation.
----

I think it's perfectly ok for sysops to put their completions either
in /usr/share/bash-completion/modules or directly
in /etc/bash_completion.d if they want.

> 
> > The OS and sysadmin distinction is there primarily to ensure that sysadmins 
> > and OS/package defaults don't stomp on each other.  I'm not entirely sure if 
> > this is needed, but it could be useful.
> 
> Yes, it is needed indeed.

Maybe it's needed for package managers that can't handle the case.

> 
> > The order to load stuff could be:
> > 
> > 1) ~/.bash_completion
> > 2) ~/.bash_completion.d/*
> > 3) /etc/bash_completion.d/*
> > 4) /var/lib/bash-completion/*
> 
> 1) /var/lib/bash-completion/*   # or whatever directory we choose
> 2) /etc/bash_completion.d/*     # backwards compatibility, and sysadmin-ground
> 3) ~/.bash_completion.d/*       # superceding completions in /var/lib/ and /etc/

I'd make it just:
1) /etc/bash_completion.d/*     # backwards compatibility, and
sysadmin-ground
2) ~/.bash_completion.d/*       # superceding completions in /var/lib/ and /etc/

That's simple, and it doesn't assume that admins want all their modules
enabled.

Regards,
-- 
Santiago Moisés Mola
Jabber: cooldwind at gmail.com | GPG: AAD203B5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
 digitalmente
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20090116/0367a3ae/attachment.pgp 


More information about the Bash-completion-devel mailing list