aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2012-03-29 19:59:35 -0500
committerJack Nagel2012-03-29 20:11:00 -0500
commit7706e1210f8a4c284d64f605f5032a20ffd89d9b (patch)
tree8819190e3248687053fc7121e5d998295a282720
parent0cbdeeaa3c02c3e46e75e8b6e0a3333f78639d5a (diff)
downloadbrew-7706e1210f8a4c284d64f605f5032a20ffd89d9b.tar.bz2
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>
-rw-r--r--Library/Contributions/brew_bash_completion.sh34
1 files changed, 4 insertions, 30 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh
index 7faaf9e93..6261f7749 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 (<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