4

I'm on Manjaro Linux.

I'm trying to customize my bash completion but most of the completions I've got (in /usr/share/bash-completion/completions/ & from github have a line like _init_completion || return. However, upon trying _<TAB>, there is no _init_completion function, and I can't find it in any of my completion files.

This _init_completion seems to be used by most bash completion scripts but doesn't seem to be defined anywhere. Googling "bash _init_completion" doesn't return a clear result with a file defining the function either.

Where can I get the _init_completion function?

1

1 Answer 1

3

At least on my Debian 10 system, it is defined in /usr/share/bash-completion/bash_completion, and sourced from there by /etc/profile.d/bash_completion.sh, which is in turn sourced by /etc/profile.

Those files are provided in Debian by a separate bash-completion package. Its upstream source is the very same Github repository you linked, not in the completions sub-directory but at the top level of the repository.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.