aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-10-29 19:17:26 +0000
committerGitHub2017-10-29 19:17:26 +0000
commit4c44266aa5cfab215b92ef0aa5bb12112d8a4cb8 (patch)
tree148dced9d92ac5dd6b89a0255045391fe454aeaf /Library
parentc59c0d682087f452329f8c1324e16c99c6d0cd2d (diff)
parent35493774785fbe870881c9cf5f7e4d66ab4926d2 (diff)
downloadbrew-4c44266aa5cfab215b92ef0aa5bb12112d8a4cb8.tar.bz2
Merge pull request #3394 from MikeMcQuaid/sh-no-ps1
cmd/sh: set working PS1 for zsh
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/sh.rb6
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;