Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~/.bash_completion is sourced twice #171

Open
Cougar opened this issue Jan 11, 2025 · 0 comments
Open

~/.bash_completion is sourced twice #171

Cougar opened this issue Jan 11, 2025 · 0 comments

Comments

@Cougar
Copy link

Cougar commented Jan 11, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant