Currently, dbus bash completion is installed under /etc/profile.d/. This just works but it's different of how most distros manage bash completion scripts. Adding a --with-bash-completion-dir= or similar option would help us to choose where to install dbus completion (/etc/bash-completion.d in Debian, /usr/share/bash-completion/ in Gentoo, etc). One option could be default --with-bash-completion-dir= to /etc/profile.d/ and be done with it. Another one would be to rename 'dbus-bash-completion.sh' to just 'dbus' and default bash-completion-dir to /etc/bash-completion.d. The first one just works, and the second integrates better in some distros.
It looks to me like we should just always use bash_completion.d ?
(In reply to comment #1) > It looks to me like we should just always use bash_completion.d ? > There are plans to use a different bash-completion instalation layout in the near future [1], but /etc/bash_completion.d will still work for backwards compatibility, so it's safe to always use it if no --with-bash-completion-dir= is implemented. [1] http://wiki.debian.org/Teams/BashCompletion/Proposals/NewDirectoryLayout
commit 299460549e92665e5ea09d459d3985fc85d8d73c Author: Colin Walters <walters@verbum.org> Date: Fri Jan 30 16:03:11 2009 -0500 Bug 19259: Always use /etc/bash_completion.d This looks like what bash upstream has standardized on.
On Fedora the bash-completion RPM is needed for this to work. It is not reasonable to pull in that package to get completion support for dbus-send. The thing is that Bash itself doesn't know anything about /etc/bash_completion.d and no-one have provided evidence for this claim the many times I've specifically asked for it. It is true that many distros standardize on the /etc/bash_completion.d directory but some disagree on whether it is used by default and until bash upstream blesses this directory it's besides the point anyway. Please move the file back to /etc/profile.d. Thanks.
(In reply to comment #4) > On Fedora the bash-completion RPM is needed for this to work. It is not > reasonable to pull in that package to get completion support for dbus-send. In my opinion, that's maintainer's problem, and I don't see how is it a problem to install bash-completion RPM (which is just a small set of bash scripts). However, if that's really a problem, a --with-bash-completion-dir= switch could be added. Or maintainers can manually change the location. > The thing is that Bash itself doesn't know anything about > /etc/bash_completion.d and no-one have provided evidence for this claim the > many times I've specifically asked for it. > > It is true that many distros standardize on the /etc/bash_completion.d > directory but some disagree on whether it is used by default and until bash > upstream blesses this directory it's besides the point anyway. > AFAIK, Bash upstream won't standarize any directory for this since this is outside bash's scope. Bash-completion (as in bash-completion suite) is just an external set of scripts providing homogeneous bash completion handling. Most distros are shipping it and some are involved in upstream development (including Fedora's maintainer). > Please move the file back to /etc/profile.d. Thanks. Strictly speaking, /etc/profile.d isn't a standard location neither.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus-glib/issues/14.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.