[Bash-completion-devel] multiple directories in BASH_COMPLETION_COMPAT_DIR ?

Raphaël raphael.droz at gmail.com
Sun Nov 2 17:23:05 UTC 2014


On Sat, Nov 01, 2014 at 08:35:59AM +0200, Ville wrote:
> for. The profile.d snippet we ship contains a hook to load
> ~/.config/bash_completion, and you can do whatever you like in it, for
> example load completions. At that time bash_completion has not been
> sourced though which might or might not be a problem.

Right, I overlooked it.
Well actually on wheezy:
- /etc/profile.d/bash_completion.sh loads
${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion}
(before)

- /usr/share/bash-completion/bash_completion load
~/.bash_completion
(after)


Attached a quick patch.
As personal completions could probably be stored in a versioned
directory under ~/.dotfiles/.bash_completion thus I put:
> $BASH_COMPLETION_USER_DIR           overrides
> $XDG_DATA_HOME/bash-completion      overrides
> $HOME/.local/share/bash-completion
But the completions path is forced to end with an "completions"
directory. I agreed on this thinking about any further improvements over
possibilities of further user customization..

I'd just have preferred to reuse the $BASH_COMPLETION_DIR variable
as while technically a bit different, the semantic is the same.



-- 
GPG id: 0xD7F62B21
-------------- next part --------------
A non-text attachment was scrubbed...
Name: load_dyncomp_from_userdir.patch
Type: text/x-diff
Size: 596 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20141102/328e588b/attachment.patch>


More information about the Bash-completion-devel mailing list