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: instruct users to source proper file #35989

Merged
merged 2 commits into from
Jan 15, 2019

Conversation

maxim-belkin
Copy link
Member

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Currently, instructions in bash-completion (shouldn't it be bash-completions ???) formula are "unsafe". The right file to source is #{etc}/profile.d/bash_completion.sh. And here is why:

#{etc}/profile.d/bash_completion.sh file checks that:

  • it is sourced from an interactive shell
  • it has not been sourced already,
  • Bash has the right version
  • programmable completions are turned on
  • #{etc}/bash_completion is readable
    and only then sources #{etc}/bash_completion

#{etc}/bash_completion, in turn, sources files #{etc}/bash_completion.d/* as necessary.

No changes to bottles are required.

@maxim-belkin maxim-belkin changed the title bash-completion: tell users to source proper file bash-completion: instruct users to source proper file Jan 14, 2019
@fxcoudert fxcoudert merged commit 6651518 into Homebrew:master Jan 15, 2019
@fxcoudert
Copy link
Member

Thanks @maxim-belkin

@maxim-belkin maxim-belkin deleted the bash-completion-fix branch January 15, 2019 20:07
niheaven pushed a commit to niheaven/homebrew-core that referenced this pull request Jan 23, 2019
@lock lock bot added the outdated PR was locked due to age label Feb 14, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants