Remove "__brew_ps1" function from completion
This was probably silly and I'm probably the only person that ever used it. I still do, actually, but it's not really a completion function, it's simple enough to just stick in a shell startup script, and removing it makes the completion script usable under the new dynamic loading scheme provided by bash-completion 1.99+. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
0cbdeeaa3c
commit
7706e1210f
@ -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 (<formula_name>|DEBUG) $
|
||||
#
|
||||
# You can customize the output string, e.g. $(__brew_ps1 "[%s]") would
|
||||
# output "[<formula_name>|DEBUG]". The default (if you do not provide a
|
||||
# format argument) is to print "(<formula_name>|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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user