Merge pull request #3394 from MikeMcQuaid/sh-no-ps1

cmd/sh: set working PS1 for zsh
This commit is contained in:
Mike McQuaid 2017-10-29 19:17:26 +00:00 committed by GitHub
commit 4c44266aa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;