[Bash-completion-devel] Layout change

David Paleino d.paleino at gmail.com
Mon May 2 16:34:11 UTC 2011


On Mon, 02 May 2011 19:18:03 +0300, Ville Skyttä wrote:

> On 05/02/2011 06:07 PM, David Paleino wrote:
> 
> > $ tree -L 1 /usr/share/bash-completion/
> > /usr/share/bash-completion/
> > |-- bash_completion
> > |-- completions
> > `-- helpers
> 
> That looks fine to me, but I'd like to get rid of the
> BASH_COMPLETION_DIR and BASH_COMPLETION_HELPERS_DIR variables
> altogether.  I don't see why they would be required, couldn't we just
> resolve them based on bash_completion's location (i.e. assume that the
> completions and helpers dirs are in the same dir)?

What if downstream packagers/final users move things around? Will we let them
shoot their feet? :)

> That'd probably require some changes to the git layout, but I wouldn't have
> any problems with that.

Neither would I. And that would be possible just by hardcoding locations
relative to bash_completion/$BASH_COMPLETION, but...

> And while at it, wouldn't it be possible to get rid of the
> BASH_COMPLETION variable as well?

...if we get rid of BASH_COMPLETION, then we'd need to use BASH_SOURCE somehow?
I never used it, so I must document myself a bit. But maybe it's doable :)

I'll start with little steps -- first, I'll make everything depend on
BASH_COMPLETION. After that, I'll RTFM and see how to get rid of it too.

> > I hope that's ok for everyone -- before reverting, please let's discuss the
> > reasons here :)
> 
> No intentions or wishes for reverting, but here's a couple of comments:
> 
> The change broke the test suite's perl test cases.  This is trivial to
> fix (just define BASH_COMPLETION_HELPERS_DIR in source_bash_completion
> in test/lib/library.exp) but I didn't fix that yet because of the above
> wish to get rid of some variables altogether.

Ouch, I totally forgot about the testsuite. I'll fix it.

> configure.ac uses datadir in a way I suppose it shouldn't - it will
> quite probably interfere with how people use --datadir.  I've seen
> pkgdatadir used because of this in other packages.  I didn't fix this
> either yet again because I'd like to get rid of the extra variables...

Right, I missed pkgdatadir as well.

> Once these things settle down, I intend to add a pkgconfig file that
> people can use for locating the dirs where they can drop additional
> completion files.

Nice :)
I can do that as well, we just need to settle on some variable names to use
inside the .pc :)

Kindly,
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/20110502/e5fd821a/attachment.pgp>


More information about the Bash-completion-devel mailing list