[Bash-completion-devel] Bug#669180: bash-completion: please replace /etc/bash_completion symlink with a script

Jonathan Nieder jrnieder at gmail.com
Tue Apr 17 23:20:52 UTC 2012


Package: bash-completion
Version: 1:1.99-3
Severity: wishlist
Tags: patch

Hi,

As described in <http://bugs.debian.org/648319>, on Debian
/etc/bash_completion is a symlink to
/usr/share/bash-completion/bash_completion so old scripts and .bashrc
files can use

	. /etc/bash_completion

like they have always done.  The completion lib in its upstream
version uses the BASH_SOURCE variable to find itself and its helpers
and ends up trying to find these things in /etc instead of
/usr/share/bash-completion/.  And in Debian we patch it to resolve the
symlink so it can find the helpers in the right place.

Since last January, I have been using an alternative fix instead:
namely my /etc/bash_completion is a simple file with the following
content:

	. /usr/share/bash-completion/bash_completion

This way:

 - BASH_SOURCE is as the completion script expects to find it; no
   need to differ from the upstream source or risk resolving one
   symlink too many if some admin decides to divert the
   bash_completion script and replace it with a symlink to somewhere
   else

 - /etc/bash_completion can remain a conffile

 - anyone who customized their /etc/bash_completion in squeeze will
   get the usual prompt about customized configuration files when
   they upgrade

It seems to work fine.  What do you think?

Patch at http://bugs.debian.org/648319#83

Thanks,
Jonathan





More information about the Bash-completion-devel mailing list