diff options
| author | Mike McQuaid | 2017-10-29 17:23:03 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2017-10-29 17:23:05 +0000 |
| commit | 35493774785fbe870881c9cf5f7e4d66ab4926d2 (patch) | |
| tree | 804d298bd1869d1c0e2e80a65cf8f377b64c5b1e /Library | |
| parent | 9dbff4ebbec6d53ec0c01187e5b912a0abb339d2 (diff) | |
| download | brew-35493774785fbe870881c9cf5f7e4d66ab4926d2.tar.bz2 | |
cmd/sh: set working PS1 for zsh.
The `bash`, default one is broken on `zsh`.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/sh.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb index 3fe5f3005..73bf72044 100644 --- a/Library/Homebrew/cmd/sh.rb +++ b/Library/Homebrew/cmd/sh.rb @@ -25,7 +25,11 @@ module Homebrew # superenv stopped adding brew's bin but generally users will want it ENV["PATH"] = PATH.new(ENV["PATH"]).insert(1, HOMEBREW_PREFIX/"bin") end - ENV["PS1"] = 'brew \[\033[1;32m\]\w\[\033[0m\]$ ' + if ENV["SHELL"].include?("zsh") + ENV["PS1"] = "brew %B%F{green}~%f%b$ " + else + ENV["PS1"] = 'brew \[\033[1;32m\]\w\[\033[0m\]$ ' + end ENV["VERBOSE"] = "1" puts <<~EOS Your shell has been configured to use Homebrew's build environment; |
