Bash Completion Team
Proposal: ''New Directory Layout''
Drafter: David Paleino
- rename all environment variables from $BASH_COMPLETION_* to $COMP_*
- how/where to handle enabled/disabled completions? Using $COMP_*CONF ? Using symlinks? If using symlinks, see $COMP_ENABLED_DIR
please remember this is a draft. Everything can be discussed and changed.
removed /usr/share/bash-completion/enabled in favour of /etc/bash_completion.d (?ColdWind)
- The core completions. _cd(), _expand(), _get_cword() and the such would all go here.
- What would remain of current bash_completion after splitting off all extraneous third-party completions.
- Uses values from $COMP_CONF and $COMP_USER_CONF (if enabled)
- Would load completions from $COMP_PATH.
- What we now have in contrib/
- Ideally, completions should be maintained upstream, so we wouldn't install anything here. But this isn't an ideal world, and most files from this directory will probably belong to us.
- For backwards-compatibility, would just source $COMP_BASE.
- For backwards-compatibility, would source completions from here.
- Enabled completions have a symlink to them on this directory.
- We may issue a warning if people put completions here directly instead of symlinks.
- New file
- System-wide (also: per-distribution) configuration file:
- $COMP_PATH: colon-separated list of additional paths to look for completions
- $COMP_DIR: see above section
- $COMP_ENABLED_DIR: see above section
- $COMP_COMPAT_DIR: see above section
- $COMP_USER_ENABLED: whether to enable the use of per-user completions, $COMP_USER_CONF and $COMP_USER_DIR -- we could also decide to avoid this, and let the user do what she wants always.
- New file
- Per-user configuration file. Same as $COMP_CONF, should be loaded after it.
- New directory
- Per-user completions, should be loaded after those in $COMP_DIR.
- Should decide policy to handle completions name conflicts. Which ones take precedence? These or $COMP_DIR's ones?