diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 7faaf9e936..6261f7749a 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -10,30 +10,10 @@ # $(brew --prefix)/etc/bash_completion.d # $(brew --prefix)/share/bash-completion/completions # -# and bash-completion will source it automatically. -# -# The __brew_ps1() function can be used to annotate your PS1 with -# Homebrew debugging information; it behaves similarly to the __git_ps1() -# function provided by the git's bash completion script. -# -# For example, the prompt string -# -# PS1='\u@\h \W $(__brew_ps1 "(%s)") $' -# -# would result in a prompt like -# -# user@hostname cwd $ -# -# but if you are currently engaged in an interactive or debug install, -# (i.e., you invoked `brew install` with either '-i' or '-d'), then the -# prompt would look like -# -# user@hostname cwd (|DEBUG) $ -# -# You can customize the output string, e.g. $(__brew_ps1 "[%s]") would -# output "[|DEBUG]". The default (if you do not provide a -# format argument) is to print "(|DEBUG)" prefixed with a -# single space. +# Installing to etc/bash_completion.d will cause bash-completion to load +# it automatically at shell startup time. If you choose to install it to +# share/bash-completion/completions, it will be loaded on-demand (i.e. the +# first time you invoke the `brew` command in a shell session). __brewcomp_words_include () { @@ -375,12 +355,6 @@ _brew_versions () __brew_complete_formulae } -__brew_ps1 () -{ - [[ -n $HOMEBREW_DEBUG_INSTALL ]] && - printf "${1:- (%s)}" "$HOMEBREW_DEBUG_INSTALL|DEBUG" -} - _brew () { local i=1 cmd