Skip to content

~/.bash_completion is sourced twice #171

@Cougar

Description

@Cougar

By default the current implementation loads user completion file twice: first by /usr/share/bash-completion/bash_completion in bash-completion package which is called by /etc/bash.bashrc via /etc/profile.d/bash_completion.sh and then directly by /etc/bash.bashrc itself.

I think /etc/bash.bashrc is not a right place to source user ~/.bash_completion at all. Especially when it gets sourced by bash-completion package already since 2001 but added to /etc/bash.bashrc in 2013.

I can see only one use case for that when user has its own completions created but doesn't install bash-completion package which probably happens quite unlikely. But even if such situation happens I'd rather let user itself source it using $HOME/.bash.expert that is made specially for cases when user is looking for a its own customization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions