Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
completion: add __brew_ps1 to annotate $PS1
It is often useful to be reminded that you are, in fact, in the middle of a debug or interactive install. We provided this reminder in the form of HOMEBREW_DEBUG_INSTALL, but we can make this even easier for the end user to consume by exposing it in the form of a shell function. When HOMEBREW_DEBUG_INSTALL is set, the __brew_ps1() function returns the string "(formula_name|DEBUG)" by default (much like the __git_ps1() output when performing some long-running operation, e.g. "(branch|REBASE-i)". The formatting around "formula_name|DEBUG" can be customized by passing a format string to the function. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- Loading branch information