33Due to its nature, bash-completion adds a number of functions and variables in
44the shell's environment.
55
6- | | ` bash_completion ` | ` completions/* ` |
7- | :----------------------------- | :------------------ | :----------------------------------------------------- |
8- | public configuration variables | ` BASH_COMPLETION_* ` | ` BASH_COMPLETION_CMD_${Command^^}_${Config^^} ` |
9- | non-local internal variables | ` _comp__* ` | ` _comp_cmd_${Command}__${Data} ` |
10- | public/exported functions | ` _comp_* ` | ` _comp_cmd_${Command} ` (functions for ` complete -F ` ) |
11- | private/internal functions | ` _comp__* ` | ` _comp_cmd_${Command}__${Utility} ` (utility functions) |
6+ | | ` bash_completion ` | ` completions/* ` |
7+ | :----------------------------- | :------------------ | :------------------------------------------------------------------------- |
8+ | public configuration variables | ` BASH_COMPLETION_* ` | ` BASH_COMPLETION_CMD_${Command^^}_${Config^^} ` |
9+ | non-local internal variables | ` _comp__* ` | ` _comp_cmd_${Command}__${Data} ` |
10+ | public/exported functions | ` _comp_* ` | ` _comp_cmd_${Command} ` (functions for ` complete -F ` ) |
11+ | | | ` _comp_xfunc_${Command}_${Utility} ` (functions for use with ` _comp_xfunc ` ) |
12+ | private/internal functions | ` _comp__* ` | ` _comp_cmd_${Command}__${Utility} ` (utility functions) |
1213
1314` ${Command} ` refers to a command name (with characters not allowed in POSIX
1415function or variable names replaced by an underscore), ` ${Config} ` the name of
@@ -31,6 +32,11 @@ Variables and functions whose name contains a double underscore (`__`) anywhere
3132in their name are private implementation details, not part of the stable API,
3233and not intended to be used outside of their defining context.
3334
35+ Functions with names prefixed with ` _comp_xfunc_ ` are intended to be used
36+ through the ` _comp_xfunc ` function from files other than the one they are
37+ defined in. From the same file they can be used directly using their complete
38+ name.
39+
3440Function names start with an underscore in order to avoid them being
3541included in completions of command names. (Except naturally when a command
3642starting with an underscore is being completed.) The underscore prefix does
0 commit comments