Merge pull request #9260 from EricFromCanada/sh-prompt

sh: skip reading user-level initialization files
This commit is contained in:
Maxim Belkin 2020-11-23 21:34:45 -06:00 committed by GitHub
commit adb2daaadb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,9 @@ module Homebrew
safe_system(ENV["SHELL"], args.named.first)
else
subshell = if ENV["SHELL"].include?("zsh")
"PS1='brew %B%F{green}%~%f%b$ ' #{ENV["SHELL"]} -d"
"PS1='brew %B%F{green}%~%f%b$ ' #{ENV["SHELL"]} -d -f"
elsif ENV["SHELL"].include?("bash")
"PS1=\"brew \\[\\033[1;32m\\]\\w\\[\\033[0m\\]$ \" #{ENV["SHELL"]} --noprofile --norc"
else
"PS1=\"brew \\[\\033[1;32m\\]\\w\\[\\033[0m\\]$ \" #{ENV["SHELL"]}"
end