There is not really a standard place for user completion files for bash. According to this Stack Exchange answer, the bash-completion package respects an environment variable called $BASH_COMPLETION_USER_DIR, using defaults as follows:
$BASH_COMPLETION_USER_DIR, if it exists
$XDG_DATA_HOME/bash-completion/completions, if $XDG_DATA_HOME exists
~/.local/share/bash-completion/completions if neither $BASH_COMPLETION_USER_DIR nor $XDG_DATA_HOME is set
Since that is as close to a standard as we can get in bash, we should replicate that standard when installing our own bash completion script.
There is not really a standard place for user completion files for bash. According to this Stack Exchange answer, the bash-completion package respects an environment variable called
$BASH_COMPLETION_USER_DIR
, using defaults as follows:$BASH_COMPLETION_USER_DIR
, if it exists$XDG_DATA_HOME/bash-completion/completions
, if$XDG_DATA_HOME
exists~/.local/share/bash-completion/completions
if neither$BASH_COMPLETION_USER_DIR
nor$XDG_DATA_HOME
is setSince that is as close to a standard as we can get in bash, we should replicate that standard when installing our own bash completion script.