Bug 1264094 - RFE: Please add XDG_DATA_DIRS support to bash-completion
Summary: RFE: Please add XDG_DATA_DIRS support to bash-completion
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-17 13:48 UTC by Severin Gehwolf
Modified: 2017-07-25 08:02 UTC (History)
3 users (show)

Fixed In Version: bash-completion-2.2-1.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-03 15:48:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1464084 0 unspecified CLOSED scl enable rh-postgresql95 sets wrong XDG_DATA_DIRS (omits /usr/share) 2021-02-22 00:41:40 UTC

Internal Links: 1464084

Description Severin Gehwolf 2015-09-17 13:48:27 UTC
Description of problem:

It is useful in certain situations to have additional completions available which get activated on-demand. The example use-case is software collections. By enabling a collection a new file system hierarchy is made available. Thus new binaries can be made available this way as well. For such binaries it would be great to have bash completions as well.

Typical use case is:

1. Activate collection: "scl enable <collection-name> bash"
2. Have new binary in /opt/<root>/<scl-name>/root/usr/bin/ available.
3. Similarly, bash completions could be added to existing completions by
   also loading completions from /opt/<root>/<scl-name>/root/usr/share/bash-completion/completions

One way to achieve this is for bash-completion to read the XDG_DATA_DIRS[1] variable for locations from where to source additional completions (in addition to XDG_DATA_HOME). Software collections could then set the XDG_DATA_DIRS env variable accordingly.

An example setting of XDG_DATA_DIRS could be:
XDG_DATA_DIRS=/usr/local/share:/usr/share:/opt/foo/bar/root/usr/share


Note You need to log in before you can comment on or make changes to this bug.