[Bash-completion-devel] [bash-completion-Bugs][312795] Bash completion should also load files from /usr/local/etc/bash_completion.d

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Mon Apr 25 11:18:03 UTC 2011


Bugs item #312795, was changed at 2010-11-01 07:47 by Ville Skyttä 
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312795&group_id=100114

>Status: Closed
Priority: 3
Submitted By: Alexandre Quessy (alexandrequessy-guest)
>Assigned to: Ville Skyttä  (scop-guest)
Summary: Bash completion should also load files from /usr/local/etc/bash_completion.d 
Distribution: None
Originally reported in: None
>Milestone: 2.0
>Status: Fix Committed
Original bug number: 


Initial Comment:
Hello,

In which paths does the bash completion look? By looking at /etc/bash_completion, I think it's only /etc/bash_completion, not /usr/local/etc/bash_completion.d

That means that my Makefile.am should not install the bash completion file to $(sysconfdir)/bash_completion.d, but rather to /etc/bash_completion.d. (hard-coded)

Here is an example from my Toonloop project: 

completiondir = $(sysconfdir)/bash_completion.d
dist_completion_DATA = toonloop

That's slightly annoying, because installing from a tarball will override the file from the Debian package, if installed. 

It would be much nicer if the /etc/bash_completion would also look in the /usr/local/etc/bash_completion.d directory. 

Am I right?
Best regards,
Alexandre Quessy
http://wiki.debian.org/AlexandreQuessy 

----------------------------------------------------------------------

>Comment By: Ville Skyttä  (scop-guest)
Date: 2011-04-25 14:18

Message:
Current git now looks (only) from $(sysconfdir)/bash_completion.d.  A pkgconfig or somesuch file would still be useful, but for now I suggest checking existence of $(sysconfdir)/bash_completion.d and /etc/bash_completion.d in that order and install to the first dir found.

http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=2738468ddef169b81f780fffdb86e88e684ad18c

----------------------------------------------------------------------

Comment By: Ville Skyttä  (scop-guest)
Date: 2010-11-01 17:18

Message:
You're right, this is kind of a bug. We have a roadmap item for a possible new directory layout for the next release, so things will probably change. Until then, I can only suggest that you hardcode /etc/bash_completion.d as the completion dir instead of using $(sysconfdir)/bash_completion.d

It might not be a bad idea to add a pkgconfig *.pc file for bash completion that external completion authors could use to query the completion snippet path(s).

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312795&group_id=100114



More information about the Bash-completion-devel mailing list