Merge pull request #7424 from EricFromCanada/shell-prompt-fix
sh: fix custom shell prompt for zsh
This commit is contained in:
commit
36a1c5cdc3
@ -40,10 +40,10 @@ 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"] = if ENV["SHELL"].include?("zsh")
|
||||
"brew %B%F{green}~%f%b$ "
|
||||
subshell = if ENV["SHELL"].include?("zsh")
|
||||
"PS1='brew %B%F{green}%~%f%b$ ' #{ENV["SHELL"]} -d"
|
||||
else
|
||||
'brew \[\033[1;32m\]\w\[\033[0m\]$ '
|
||||
"PS1=\"brew \\[\\033[1;32m\\]\\w\\[\\033[0m\\]$ \" #{ENV["SHELL"]}"
|
||||
end
|
||||
ENV["VERBOSE"] = "1"
|
||||
puts <<~EOS
|
||||
@ -55,6 +55,6 @@ module Homebrew
|
||||
When done, type `exit`.
|
||||
EOS
|
||||
$stdout.flush
|
||||
safe_system ENV["SHELL"]
|
||||
safe_system subshell
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user